X-Git-Url: https://git.llucax.com/software/mutest.git/blobdiff_plain/ca131d1f12146c2b2ff563e05468b4a0471f61b0..75eb5c4a3edb32190187334ca9238b3b1ef2be39:/sample/Makefile?ds=inline diff --git a/sample/Makefile b/sample/Makefile index e67a320..e7c764d 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -4,23 +4,28 @@ V=-v CFLAGS = -Wall -std=c89 -TARGET=tester +TARGET = tester +SUITES_RUNNER_SRC = test_suite_runner.c +MKMUTEST = ../mkmutest +MUTEST_H = ../mutest.h +MUTEST_C = ../mutest.c OBJS = factorial.o sum.o -TESTS = factorial_test.o sum_test.o +TESTS = factorial_test.o sum_test.o init_fail_test.o MUTEST = mutest.o -TESTER = tester.o -SO = factorial.so sum.so -ALL = $(TESTER) $(OBJS) $(TESTS) $(MUTEST) +SUITES_RUNNER = $(SUITES_RUNNER_SRC:.c=.o) +SO = factorial.so sum.so init_fail_test.so +ALL = $(SUITES_RUNNER) $(OBJS) $(TESTS) $(MUTEST) all: $(TARGET) py: $(SO) $(TARGET): $(ALL) + $(CC) $(LDFLAGS) -o $@ $^ -$(TESTER): $(OBJS) $(TESTS) $(MUTEST) - ../mkmutest ../mutest.h $(TESTS) | gcc -xc -o $(TESTER) -c - +$(SUITES_RUNNER_SRC): $(MKMUTEST) $(MUTEST_H) $(TESTS) + $(MKMUTEST) $(MUTEST_H) $(TESTS) > $@ factorial.so: factorial_test.c @@ -36,7 +41,7 @@ test-py: $(SO) ../py/mutest $(V) -a clean: - $(RM) $(TARGET) $(SO) $(ALL) + $(RM) $(TARGET) $(SO) $(ALL) $(SUITES_RUNNER_SRC) .c.so: $(CC) $(CFLAGS) $(LDFLAGS) -DMUTEST_PY -fPIC -shared -o $@ $^