gitee.com/quant1x/num@v0.3.2/asm/src/Makefile (about) 1 SOURCES = munit.c floats_test.c 2 3 ifeq ($(shell uname -m),x86_64) 4 SOURCES += floats_avx.c floats_avx512.c 5 CFLAGS = -O3 -mavx -mavx512f -mavx512dq 6 else ifeq ($(shell uname -m),aarch64) 7 SOURCES += floats_neon.c 8 CFLAGS = -O3 9 endif 10 11 OBJECTS = $(SOURCES:.c=.o) 12 DEPENDENCES = $(SOURCES:.c=.d) 13 EXECUTE = floats_test 14 15 $(EXECUTE): $(OBJECTS) 16 $(CC) $(OBJECTS) -o $(EXECUTE) 17 18 test: $(EXECUTE) 19 ./${EXECUTE} 20 21 clean: 22 rm $(OBJECTS) $(DEPENDENCES) $(EXECUTE) 23 24 -include $(DEPENDENCES) 25 26 %.d: %.c 27 @set -e; \ 28 rm -f $@; \ 29 $(CC) $(CFLAGS) -MM -MT $(@:.d=.o) $< > $@.$$$$; \ 30 sed 's,\($*\)\.o[ :]*,\1.o $@: ,g' $@.$$$$ > $@; \ 31 rm -f $@.$$$$