The file `suffix.mk' defines standard pattern rules that say how to build one kind of file from another, for example, how to build a `.o' file from a `.c' file. (GNU `make''s pattern rules are more powerful and easier to use than Unix `make''s suffix rules.)
Almost all the rules look something like this:
%.o : %.c @$(RM) $@ $(CC) $(CC_OPTS) -c $< -o $@Here's how to understand the rule. It says that something.o (say `Foo.o') can be built from something.c (`Foo.c'), by invoking the C compiler (path name held in `$(CC)'), passing to it the options `$(CC_OPTS)' and the rule's dependent file of the rule `$<' (`Foo.c' in this case), and putting the result in the rule's target `$@' (`Foo.o' in this case).
Every program is held in a `make' variable defined in `mk/config.mk' -- look in `mk/config.mk' for the complete list. One important one is the Haskell compiler, which is called `$(HC)'.
Every programs options are are held in a `make' variables called `<prog>_OPTS'. the `<prog>_OPTS' variables are defined in `mk/opts.mk'. Almost all of them are defined like this:
CC_OPTS = $(SRC_CC_OPTS) $(WAY$(_way)_CC_OPTS) $($*_CC_OPTS) $(EXTRA_CC_OPTS)The four variables from which `CC_OPTS' is built have the following meaning:
gmake libHS.a EXTRA_CC_OPTS="-v"