1 #################################################################################
5 # The Glorious fptools Boilerplate Makefile
7 # This one file should be included (directly or indirectly) by all Makefiles
8 # in the fptools hierarchy.
10 #################################################################################
12 # We want to disable all the built-in rules that make uses; having them
13 # just slows things down, and we write all the rules ourselves.
14 # Setting .SUFFIXES to empty disables them all.
15 MAKEFLAGS += --no-builtin-rules
17 # FPTOOLS_TOP is the *relative* path to the fptools toplevel directory from the
18 # location where a project Makefile was invoked. It is set by looking at the
19 # current value of TOP.
24 # This rule makes sure that "all" is the default target, regardless of where it appears
25 # THIS RULE MUST REMAIN FIRST!
29 # -----------------------------------------------------------------------------
30 # make sure the autoconf stuff is up to date...
32 $(TOP)/mk/config.mk : $(TOP)/mk/config.mk.in $(TOP)/mk/config.h.in $(TOP)/configure
33 @if test ! -f $(FPTOOLS_TOP)/config.status; then \
34 echo "You haven't run $(FPTOOLS_TOP)/configure yet."; \
37 @echo "Running $(FPTOOLS_TOP)/config.status to update configuration info..."
38 @( cd $(FPTOOLS_TOP) && ./config.status )
40 $(TOP)/configure : $(TOP)/configure.in $(TOP)/aclocal.m4
41 @echo "Regenerating $(FPTOOLS_TOP)/configure..."
42 @( cd $(FPTOOLS_TOP) && $(MAKE) -f Makefile.config ./configure )
44 # -----------------------------------------------------------------------------
47 # If $(way) is set then we define $(way_) and $(_way) from it in the
48 # obvious fashion. This must be done before suffix.mk is included,
49 # because the pattern rules in that file depend on these variables.
57 # When using $(patsubst ...) and friends, you can't use a literal comma
58 # freely - so we use ${comma} instead. (See PACKAGE_CPP_OPTS in package.mk
59 # for an example usage.)
62 # -----------------------------------------------------------------------------
63 # Now follow the pieces of boilerplate
64 # The "-" signs tell make not to complain if they don't exist
66 include $(TOP)/mk/config.mk
67 # All configuration information
68 # (generated by "configure" from config.mk.in)
72 include $(TOP)/mk/paths.mk
73 # Variables that say where things belong (e.g install directories)
74 # and where we are right now
75 # Also defines variables for standard files (SRCS, LIBS etc)
78 include $(TOP)/mk/opts.mk
79 # Variables that control the option flags for all the
82 ifeq "$(BootingFromHc)" "YES"
83 include $(TOP)/mk/bootstrap.mk
86 -include $(TOP)/mk/build.mk
87 # (Optional) build-specific configuration
93 # The dependencies file from the current directory