IcBench: Makefile

This commit is contained in:
powturbo
2021-11-11 16:13:51 +01:00
parent 0548c2b9ee
commit 415b7275e8

10
makefile Normal file → Executable file
View File

@ -46,12 +46,9 @@ ifeq ($(ARCH),ppc64le)
SSE=-D__SSSE3__
CFLAGS=-mcpu=power9 -mtune=power9 $(SSE)
else ifeq ($(ARCH),aarch64)
CFLAGS+=-march=armv8-a
CFLAGS=-march=armv8-a
ifneq (,$(findstring clang, $(CC)))
CFLAGS+=-march=armv8-a
OPT+=-fomit-frame-pointer
else
CFLAGS+=-march=armv8-a
endif
SSE=-march=armv8-a
else ifeq ($(ARCH),$(filter $(ARCH),x86_64))
@ -60,6 +57,7 @@ else ifeq ($(ARCH),$(filter $(ARCH),x86_64))
# SSE+=-mno-avx -mno-aes
CFLAGS=$(SSE)
AVX2=-march=haswell
# SSE=$(AVX2)
endif
CFLAGS+=-w -Wall $(DEBUG) $(OPT)
@ -113,6 +111,7 @@ transpose_avx2.o: transpose.c
LIB=bitpack.o bitpack_sse.o bitunpack.o bitunpack_sse.o \
vp4c.o vp4c_sse.o vp4d.o vp4d_sse.o \
bitutil.o fp.o v8.o vint.o transpose.o transpose_sse.o trlec.o trled.o vsimple.o eliasfano.o
#bic.o
ifeq ($(ARCH),x86_64)
LIB+=bitpack_avx2.o bitunpack_avx2.o vp4c_avx2.o vp4d_avx2.o transpose_avx2.o
endif
@ -127,7 +126,7 @@ myapp: myapp.o libic.a
$(CC) $^ $(LDFLAGS) -o myapp
mycpp: mycpp.o libic.a
$(CXX) $^ $(LDFLAGS) -lpthread -o mycpp
$(CXX) $^ $(LDFLAGS) -o mycpp
.c.o:
$(CC) -O3 $(CFLAGS) $< -c -o $@
@ -147,4 +146,3 @@ clean:
@find . -type f -name "*\.o" -delete -or -name "*\~" -delete -or -name "core" -delete -or -name "icbench" -delete -or -name "libic.a" -delete
@find . -type f -name "icbench" -delete -or -name "idxqry" -delete -or -name "idxseg" -delete -or -name "idxcr" -delete -or -name "icapp" -delete
endif