1# 2# realtime test suite Makefile. 3# 4# Copyright (C) 2009, Cisco Systems Inc. 5# 6# This program is free software; you can redistribute it and/or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 2 of the License, or 9# (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, 12# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# GNU General Public License for more details. 15# 16# You should have received a copy of the GNU General Public License along 17# with this program; if not, write to the Free Software Foundation, Inc., 18# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19# 20# Ngie Cooper, September 2009 21# 22 23top_srcdir ?= ../.. 24 25# Override these variables to use non-system available tools. 26ACLOCAL ?= aclocal 27AUTOCONF ?= autoconf 28AUTOHEADER ?= autoheader 29AUTOMAKE ?= automake 30 31include $(top_srcdir)/include/mk/env_pre.mk 32# Ensure that this error / warning only applies for build targets. 33# 34# NOTE (garrcoop): this criterium should be in-sync with include/mk/env_pre.mk 35# (minus help as that's only invoked in the top-level Makefile). 36ifeq ($(filter autotools %clean .gitignore gitignore.%,$(MAKECMDGOALS)),) 37include $(abs_srcdir)/config.mk 38endif 39 40LIBDIR := lib 41FILTER_OUT_DIRS := $(LIBDIR) m4 42LIB := $(LIBDIR)/librealtime.a 43 44# START autotools junk 45AUTOGENERATED_FILES = \ 46 m4/Makefile 47 48AUTOMAKE_FILES := config.guess config.sub install-sh missing stamp-h1 49 50.PHONY: autotools aclocal autoconf autoheader automake 51autotools: aclocal autoconf autoheader automake 52 53.PHONY: ac-clean ac-distclean ac-maintainer-clean 54ac-clean:: 55 $(RM) -rf autom4te.cache 56 $(RM) -f aclocal.m4 config.log config.status 57 $(RM) -f include/realtime_config.h include/stamp-h1 58 59ac-distclean:: ac-clean 60ac-maintainer-clean:: ac-distclean 61 $(RM) -f aclocal.m4 configure $(AUTOMAKE_FILES) m4/Makefile.in 62 $(RM) -f include/realtime_config.h.in 63 64aclocal.m4: 65 $(ACLOCAL) -I $(abs_srcdir)/m4 66 67autoconf: configure 68 69include/realtime_config.h.in: configure.ac $(wildcard m4/*.m4) aclocal.m4 70 $(AUTOHEADER) 71 72configure: configure.ac aclocal.m4 73 $(AUTOCONF) 74automake: $(AUTOMAKE_FILES) 75$(AUTOMAKE_FILES): m4/Makefile.in 76m4/Makefile.in: m4/Makefile.am aclocal.m4 77 $(AUTOMAKE) -c -a 78 79.PHONY: autoheader 80autoheader: include/realtime_config.h.in 81 $(AUTOHEADER) 82 83distclean:: %: clean ac-distclean 84 $(RM) -f $(AUTOGENERATED_FILES) 85 86maintainer-clean:: distclean ac-maintainer-clean 87 88$(AUTOGENERATED_FILES): $(top_builddir)/config.status 89 $(SHELL) $^ 90 91# END autotools junk 92 93$(LIBDIR): 94 mkdir -p "$@" 95 96$(LIB): $(LIBDIR) 97 $(MAKE) -C $^ -f "$(abs_srcdir)/$(LIBDIR)/Makefile" all 98 99trunk-all: $(LIB) 100 101trunk-clean:: | lib-clean 102 103lib-clean:: $(LIBDIR) 104 $(MAKE) -C $^ -f "$(abs_srcdir)/$(LIBDIR)/Makefile" clean 105 106# Stub reference for config.mk 107$(abs_srcdir)/config.mk: 108 $(MAKE) -C $(top_srcdir) help; false 109 110include $(top_srcdir)/include/mk/generic_trunk_target.mk 111