1 #
2 # (GNU) Makefile for UN*X-like systems
3 # This makefile shows how to make a different runner for each test
4 #
6 .PHONY: all clean
8 all: run
10 clean:
11 rm -f *~ *.cpp *.o runner
13 CXXTESTDIR = ../..
14 CXXTESTGEN = $(CXXTESTDIR)/cxxtestgen.pl
15 CXXTESTFLAGS = --have-eh --abort-on-fail
17 TESTS = $(wildcard ../*Test.h)
18 OBJS = runner.o $(TESTS:../%.h=%.o)
20 run: runner
21 ./runner
23 runner: $(OBJS)
24 c++ -o $@ $^
26 %.o: %.cpp
27 c++ -c -o $@ -I $(CXXTESTDIR) -I .. $^
29 %.cpp: ../%.h
30 $(CXXTESTGEN) $(CXXTESTFLAGS) --part -o $@ $^
32 runner.cpp:
33 $(CXXTESTGEN) $(CXXTESTFLAGS) --root --error-printer -o $@
35 #
36 # Local Variables:
37 # compile-command: "make -fMakefile.unix"
38 # End:
39 #