1# compiler options 2CXX += -fsanitize=undefined 3CXXFLAGS = -std=c++14 -pipe -Wall -Wextra -Wpedantic -Wconversion -fmax-errors=2 -fdiagnostics-color=auto -O2 -g 4#LDFLAGS = -s 5SRC_NAME = main \ 6 test_blake1_224 test_blake1_256 test_blake1_384 test_blake1_512 \ 7 test_blake2 test_blake2s \ 8 test_cshake \ 9 test_crc_32 \ 10 test_has_160 \ 11 test_md2 test_md4 test_md5 \ 12 test_ripemd_128 test_ripemd_160 test_ripemd_256 test_ripemd_320 \ 13 test_sha1 \ 14 test_sha2_224 test_sha2_256 test_sha2_384 test_sha2_512 \ 15 test_sha2_512_224 test_sha2_512_256 \ 16 test_sha3 test_shake \ 17 test_sm3 \ 18 test_tiger \ 19 test_tuple_hash \ 20 test_whirlpool 21EXECUTABLE = run_tests 22SRC_EXT = cpp 23 24 25# targets 26all: $(EXECUTABLE) 27 28$(EXECUTABLE): $(patsubst %,%.o,$(SRC_NAME)) 29 $(CXX) $(LDFLAGS) $(patsubst %,%.o,$(SRC_NAME)) -o $(EXECUTABLE) 30 @echo 31 32$(patsubst %,%.o,$(SRC_NAME)): %.o : %.$(SRC_EXT) 33 $(CXX) $(CXXFLAGS) -c $< -o $@ 34 35clean: 36 rm -f $(patsubst %,./%.o,$(SRC_NAME)) ./$(EXECUTABLE) 37