#OFLAGS += -malign-double
CFLAGS += -W -Wall -Wextra -g
CFLAGS += -std=c99 -D_XOPEN_SOURCE=500
-CFLAGS += $(OFLAGS) $(INCLUDES) $(GCOVER)
-LDFLAGS += -g
+CFLAGS += $(OFLAGS) $(INCLUDES) $(GCOV)
+LDFLAGS += -g $(GCOV)
# Targets
SHELL = bash
-MAKE = mingw32-make
+#MAKE = mingw32-make
MAKEFLAGS += -s
+include $(wildcard .makefile)
# Functions
gcov_%:
$(MAKE) purge
- CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs -ftest-coverage" $(MAKE)
+ GCOV="-fprofile-arcs -ftest-coverage -O0" $(MAKE)
$(MAKE) test_$(@:gcov_%=%)
gcov `sed -e 's/\.exe:/.c/;s/\.o/.c/g' $(@:gcov_%=%.ld)`
touch gcov