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 # $(FPTOOLS_TOP) is the old name for $(TOP), kept for backwards compat
21 # This rule makes sure that "all" is the default target, regardless of where it appears
22 # THIS RULE MUST REMAIN FIRST!
25 # -----------------------------------------------------------------------------
28 # If $(way) is set then we define $(way_) and $(_way) from it in the
29 # obvious fashion. This must be done before suffix.mk is included,
30 # because the pattern rules in that file depend on these variables.
38 # When using $(patsubst ...) and friends, you can't use a literal comma
39 # freely - so we use ${comma} instead. (See PACKAGE_CPP_OPTS in package.mk
40 # for an example usage.)
43 # -----------------------------------------------------------------------------
44 # Now follow the pieces of boilerplate
45 # The "-" signs tell make not to complain if they don't exist
47 include $(TOP)/mk/config.mk
48 # All configuration information
49 # (generated by "configure" from config.mk.in)
53 include $(TOP)/mk/paths.mk
54 # Variables that say where things belong (e.g install directories)
55 # and where we are right now
56 # Also defines variables for standard files (SRCS, LIBS etc)
59 include $(TOP)/mk/opts.mk
60 # Variables that control the option flags for all the
63 ifeq "$(BootingFromHc)" "YES"
64 include $(TOP)/mk/bootstrap.mk
67 # (Optional) build-specific configuration
68 include $(TOP)/mk/custom-settings.mk
73 # The dependencies file from the current directory