1ROOT_DIR=../.. 2BUILD_DIR=$(ROOT_DIR)/build 3# NOTE: we do not want warnings to pollute our compilation ... 4WNOERROR=1 5include $(ROOT_DIR)/common.mk 6 7BIN_CFLAGS += -I$(ROOT_DIR)/include/ -Wno-shadow -Wno-conversion -Wno-cast-align -Wno-unused-macros 8 9# Remove some false alarms 10BIN_CFLAGS += -Wno-unused-but-set-variable -Wno-declaration-after-statement 11 12NUM_TESTS ?= 1000 13 14all: bin tests 15 16bin: 17 $(VERBOSE_MAKE)$(CROSS_COMPILE)$(CC) $(BIN_CFLAGS) -DDEBUG -DWITH_STDLIB arithmetic_tests.c $(LIBARITH) $(ROOT_DIR)/src/external_deps/print.c $(ROOT_DIR)/src/external_deps/rand.c $(BIN_LDFLAGS) -o arithmetic_tests 18 19tests: bin 20 # Get the word size and maximum nn bit length 21 $(eval WORDSZ := $(shell ./arithmetic_tests -info | cut -d ' ' -f1)) 22 $(eval MAXBITS := $(shell ./arithmetic_tests -info | cut -d ' ' -f2)) 23 python2 arithmetic_tests_generator.py stdout $(WORDSZ) $(MAXBITS) $(NUM_TESTS) | ./arithmetic_tests 24 25clean: 26 @rm -f arithmetic_tests 27