2 # Show the tests summary
5 CFLAGS = -Wall -std=c89
8 SUITES_RUNNER_SRC = test_suite_runner.c
10 MUTEST_H = ../mutest.h
11 MUTEST_C = ../mutest.c
13 OBJS = factorial.o sum.o
14 TESTS = factorial_test.o sum_test.o init_fail_test.o
16 SUITES_RUNNER = $(SUITES_RUNNER_SRC:.c=.o)
17 SO = factorial.so sum.so init_fail_test.so
18 ALL = $(SUITES_RUNNER) $(OBJS) $(TESTS) $(MUTEST)
25 $(CC) $(LDFLAGS) -o $@ $^
27 $(SUITES_RUNNER_SRC): $(MKMUTEST) $(MUTEST_H) $(TESTS)
28 $(MKMUTEST) $(MUTEST_H) $(TESTS) > $@
30 factorial.so: factorial_test.c
34 $(MUTEST): ../mutest.c
35 $(CC) $(CFLAGS) -c -o mutest.o $^
44 $(RM) $(TARGET) $(SO) $(ALL) $(SUITES_RUNNER_SRC)
47 $(CC) $(CFLAGS) $(LDFLAGS) -DMUTEST_PY -fPIC -shared -o $@ $^
51 .PHONY: all test clean