0f78b67daaaf4667cea2e54cfd19e03e3bdd1510
[ghc-hetmet.git] / mk / boilerplate.mk
1 #################################################################################
2 #
3 #                           mk/boilerplate.mk
4 #
5 #               The Glorious fptools Boilerplate Makefile
6 #
7 # This one file should be included (directly or indirectly) by all Makefiles 
8 # in the fptools hierarchy.
9 #
10 #################################################################################
11
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
16
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.
20 #
21 FPTOOLS_TOP := $(TOP)
22
23
24 # This rule makes sure that "all" is the default target, regardless of where it appears
25 #               THIS RULE MUST REMAIN FIRST!
26 default: all
27
28
29
30 #               Now follow the pieces of boilerplate
31 #               The "-" signs tell make not to complain if they don't exist
32
33 include $(TOP)/mk/config.mk
34 # All configuration information
35 #       (generated by "configure" from config.mk.in)
36 #
37
38
39 include $(TOP)/mk/paths.mk
40 # Variables that say where things belong (e.g install directories)
41 # and where we are right now
42 # Also defines variables for standard files (SRCS, LIBS etc)
43
44
45 include $(TOP)/mk/opts.mk
46 # Variables that control the option flags for all the
47 # language processors
48
49 include $(TOP)/mk/suffix.mk
50 # Suffix rules for Haskell, C and literate 
51
52 -include $(TOP)/mk/build.mk
53 # (Optional) build-specific configuration
54 #
55
56 ifndef FAST
57 -include .depend
58 endif
59 # The dependencies file from the current directory
60