1 #################################################################################
5 # The Glorious GHC Boilerplate Makefile
7 # This one file should be included (directly or indirectly) by all Makefiles
8 # in the GHC 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 # GHC_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.
23 # $(FPTOOLS_TOP) is the old name for $(GHC_TOP), kept for backwards compat
27 # This rule makes sure that "all" is the default target, regardless of where it appears
28 # THIS RULE MUST REMAIN FIRST!
31 # -----------------------------------------------------------------------------
34 # If $(way) is set then we define $(way_) and $(_way) from it in the
35 # obvious fashion. This must be done before suffix.mk is included,
36 # because the pattern rules in that file depend on these variables.
44 # When using $(patsubst ...) and friends, you can't use a literal comma
45 # freely - so we use ${comma} instead. (See PACKAGE_CPP_OPTS in package.mk
46 # for an example usage.)
49 # -----------------------------------------------------------------------------
50 # Now follow the pieces of boilerplate
51 # The "-" signs tell make not to complain if they don't exist
53 include $(TOP)/mk/config.mk
54 # All configuration information
55 # (generated by "configure" from config.mk.in)
59 include $(TOP)/mk/paths.mk
60 # Variables that say where things belong (e.g install directories)
61 # and where we are right now
62 # Also defines variables for standard files (SRCS, LIBS etc)
65 include $(TOP)/mk/opts.mk
66 # Variables that control the option flags for all the
69 ifeq "$(BootingFromHc)" "YES"
70 include $(TOP)/mk/bootstrap.mk
73 -include $(TOP)/mk/build.mk
74 # (Optional) build-specific configuration
80 # The dependencies file from the current directory