exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

makefile (802B)


      1 ### If you wish to use extra libraries (math.h for instance),
      2 ### add their flags here (-lm in our case) in the "LIBS" variable.
      3 
      4 LIBS = -lm
      5 
      6 ###
      7 CFLAGS  = -std=c99
      8 CFLAGS += -g
      9 CFLAGS += -Wall
     10 CFLAGS += -Wextra
     11 CFLAGS += -pedantic
     12 CFLAGS += -Werror
     13 CFLAGS += -Wmissing-declarations
     14 CFLAGS += -DUNITY_SUPPORT_64
     15 
     16 ASANFLAGS  = -fsanitize=address
     17 ASANFLAGS += -fno-common
     18 ASANFLAGS += -fno-omit-frame-pointer
     19 
     20 test: tests.out
     21 	@./tests.out
     22 
     23 memcheck: test/*.c src/*.c src/*.h
     24 	@echo Compiling $@
     25 	@$(CC) $(ASANFLAGS) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o memcheck.out $(LIBS)
     26 	@./memcheck.out
     27 	@echo "Memory check passed"
     28 
     29 clean:
     30 	rm -rf *.o *.out *.out.dSYM
     31 
     32 tests.out: test/*.c src/*.c src/*.h
     33 	@echo Compiling $@
     34 	@$(CC) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o tests.out $(LIBS)