1 # Modules, each containing:
2 # * $(MODULE)/Make.inc -- makefile include
3 # * $(MODULE)/$(MODULE).h -- minimal "interface" header file
4 # * $(MODULE)/$(MODULE).ih -- internal/implementation header file
5 # (only to be included by sources within the module)
6 # * $(MODULE)/*.cc -- module source files
7 MODULES := main reader store alien typeregister textmodel fold typepath
9 CXXFLAGS = -I.
12 # Variables for the modules to write to
13 SRCS :=
15 # Include module definitions
18 # This rule just links the object files together
22 # This rule build an object (.o) from a source (.cc).
26 # For each implementation header (.ih) generate a dependency (.d) file which
27 # will ensure that the compiled header (.ih.gch) is rebuilt whenever the header
28 # files included by the .ih are updated.
29 # The options given to GCC for this are as follows:
30 # -MM : calculate dependencies, but exclude system headers
31 # -MF : output dependencies to the given file
32 # -MP : generate "header.h:" rules to avoid errors on deletion of headers
33 # -MT : the main rule has the given target (to handle subdirs correctly)
34 # The .d file is not an explicit target because it will need to be (re-)built
35 # if and only if the .ih.gch needs to be rebuilt.
40 # Each module has a .ih file that should be *the only* include from the .cc
41 # files. These .ih files are pre-compiled to .ih.gch, and dependency caching
42 # is based on the .ih files, not the .cc files.
43 define depend_on_compiled_header
45 endef
53 # Include the generated dependency files (if they exist)