Go to the first, previous, next, last section, table of contents.
If you look at `$(FPTOOLS_TOP)/mk/boilerplate.mk' you will find that
it consists of the following sections, each held in a separate file:
- `config.mk'
- is the build configuration file we discussed at length
in Section See section Getting the build you want.
- `paths.mk'
- defines `make' variables for pathnames and file
lists. In particular, it gives definitions for:
- `SRCS':
- all source files in the current directory.
- `HS_SRCS':
- all Haskell source files in the current directory.
It is derived from `$(SRCS)', so if you override `SRCS' with a new value
`HS_SRCS' will follow suit.
- `C_SRCS':
- similarly for C source files.
- `HS_OBJS':
- the `.o' files derived from `$(HS_SRCS)'.
- `C_OBJS':
- similarly for `$(C_SRCS)'.
- `OBJS':
- the concatenation of `$(HS_OBJS)' and `$(C_OBJS)'.
Any or all of these definitions can easily be overriden by giving new
definitions in your `Makefile'. For example,
if there are things in the current directory that look like source files
but aren't, then you'll need to set `SRCS' manually in your `Makefile'.
The other definitions will then work from this new definition.
What, exactly, does `paths.mk' consider a "source file" to be.
It's based the file's suffix (e.g. `.hs', `.lhs', `.c', `.lc', etc),
but this is the kind of detail that changes
more rapidly, so rather than enumerate the source suffices here the best thing
to do is to look in `paths.mk'.
- `opts.mk'
- defines `make' variables for option strings to
pass to each program. For example, it defines `HC_OPTS', the
option strings to pass to the Haskell compiler. See section See section Pattern rules and options.
- `suffix.mk'
- defines standard pattern rules -- see section See section Pattern rules and options
Any of the variables and pattern rules defined by the boilerplate file
can easily be overridden in any particular `Makefile', because
the boilerplace `include' comes first. Definitions after this
`include' directive simply override the default ones in `boilerplate.mk'.
Go to the first, previous, next, last section, table of contents.