The application's Makefile+
file
contains all
and test
targets, and, just like an ordinary
Makefile
, running
make+ all or make+ test
just executes these targets. However, recall from
the theory of
operation chapter, before the application's
Makefile+
runs, the
make+ library is loaded
first. Thus the application's all
and
test
targets may - if they want -
use macros and scripts from make+.
As an example, here is a typical test
target, which makes use of the make+
library's MP_RUN_TESTS
macro:
test: test_hash test_matvec test_pool $(MP_RUN_TESTS) $^ test_hash: test_hash.o $(CC) $(CFLAGS) $^ -o $@ $(LIBS) test_matvec: test_matvec.o $(CC) $(CFLAGS) $^ -o $@ $(LIBS) test_pool: test_pool.o $(CC) $(CFLAGS) $^ -o $@ $(LIBS)