X-Git-Url: http://git.squeep.com/?p=reservoir_sample;a=blobdiff_plain;f=Makefile;h=e1b5ff8dd0b14a3eb5ebaec2ec83c70614aae599;hp=2762a295d5cbbc2d71624205d182f0ce39134b17;hb=HEAD;hpb=97d878a076b7a769ed3e5f65f95fa453406af63c diff --git a/Makefile b/Makefile index 2762a29..e1b5ff8 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,20 @@ #!make -ifeq "$(origin CC)" "default" -CC = clang -endif +#ifeq "$(origin CC)" "default" +#CC = clang +#endif CFLAGS += -g -Wall -Wextra -#CPPFLAGS += -DNDEBUG +CFLAGS += -O3 +CPPFLAGS += -DNDEBUG LDFLAGS += MAKEDEPEND = $(CC) -MM TARGETS = reservoir_sample TEST_DIR = test -TESTS = $(addprefix $(TEST_DIR)/, reservoir_sample_test) -SOURCES = reservoir_sample.c notify.c +TESTS = $(addprefix $(TEST_DIR)/, buf_test reservoir_test) +SOURCES = reservoir_sample.c notify.c buf.c randomness.c reservoir.c OBJECTS = $(SOURCES:.c=.o) TEST_OBJECTS = $(TESTS:=.o) test_suite.o @@ -38,12 +39,15 @@ check: test echo Checking $${t};\ ./$${t} > /dev/null || echo -- $${t} FAILED --;\ done + $(TEST_DIR)/validate-statistics.sh $(TEST_DIR)/%_test.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -DTEST -c -o $@ $< -$(TEST_DIR)/reservoir_sample_test: %: %.o test_suite.o notify.o +$(TEST_DIR)/buf_test: %: %.o test_suite.o notify.o -reservoir_sample: %: %.o notify.o +$(TEST_DIR)/reservoir_test: %: %.o test_suite.o notify.o buf.o randomness.o + +reservoir_sample: %: %.o notify.o buf.o randomness.o reservoir.o -include .depend