exercism

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

makefile (740B)


      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 
     14 ASANFLAGS  = -fsanitize=address
     15 ASANFLAGS += -fno-common
     16 ASANFLAGS += -fno-omit-frame-pointer
     17 
     18 test: tests.out
     19 	@./tests.out
     20 
     21 memcheck: test/*.c src/*.c src/*.h
     22 	@echo Compiling $@
     23 	@$(CC) $(ASANFLAGS) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o memcheck.out $(LIBS)
     24 	@./memcheck.out
     25 	@echo "Memory check passed"
     26 
     27 clean:
     28 	rm -rf *.o *.out *.out.dSYM
     29 
     30 tests.out: test/*.c src/*.c src/*.h
     31 	@echo Compiling $@
     32 	@$(CC) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o tests.out $(LIBS)