Makefile (830B)
1 CC=clang 2 CFLAGS+=-std=c99 -pedantic -Wall -Werror -Wstrict-prototypes 3 CFLAGS+=-Wmissing-prototypes -Wmissing-declarations -Wshadow 4 CFLAGS+=-Wpointer-arith -Wcast-qual -Wsign-compare 5 CFLAGS+=-O2 -g 6 CFLAGS+=-fstack-protector-all -Wtype-limits -fno-common 7 CFLAGS+=-fno-builtin 8 CFLAGS+=-I/usr/local/include 9 LDFLAGS=-lcunit -L/usr/local/lib 10 11 TEST_OBJS=\ 12 test_reading.o \ 13 test_stack_u64.o \ 14 test_stack_str.o \ 15 test_sd.o \ 16 test_smallset.o \ 17 test_stack_sd.o \ 18 test_ht.o \ 19 test_set_u64.o 20 OBJS=\ 21 ../reading.o \ 22 ../stack_u64.o \ 23 ../stack_str.o \ 24 ../sd.o \ 25 ../smallset.o \ 26 ../stack_sd.o \ 27 ../ht.o \ 28 ../set_u64.o 29 30 all: utils tests 31 32 utils: 33 make -C ../ 34 35 tests: tests.c $(TEST_OBJS) 36 $(CC) $(CFLAGS) $(LDFLAGS) -o tests tests.c $(OBJS) $(TEST_OBJS) 37 ./tests 38 39 .c.o: 40 $(CC) $(CFLAGS) -c $< 41 42 clean: 43 rm -rf tests $(TEST_OBJS)