X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FMakefile;h=b1165d65ae56b5135101cd0e2c676ad46a817c6f;hb=refs%2Fheads%2Fmaster;hp=9812eac3e7fee87f4a76466e32c21f620f22e0e9;hpb=e149430065e70e25d32153a588c078cee53655f5;p=SXSI%2Flibcds.git diff --git a/src/Makefile b/src/Makefile index 9812eac..b1165d6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,14 +1,20 @@ CPP=g++ POPCOUNT=$(shell grep -q popcnt /proc/cpuinfo && echo 1) +SSE=$(shell grep -q sse /proc/cpuinfo && echo 1) ifeq ($(POPCOUNT), 1) POPCOUNT_FLAG=-DHAS_NATIVE_POPCOUNT -mpopcnt else -#POPCOUNT_FLAG=-DHAS_POPCOUNT_TABLE POPCOUNT_FLAG= endif -CPPFLAGS=-O3 -Wall -DNDEBUG -fno-PIC $(POPCOUNT_FLAG) -g -msse +ifeq ($(SSE), 1) + SSE_FLAG=-DHAS_NATIVE_POPCOUNT -mpopcnt +else + SSE_FLAG=-msse +endif + +CPPFLAGS=-O3 -Wall -DNDEBUG -fno-PIC $(POPCOUNT_FLAG) $(SSE_FLAG) -g INCL=-I../includes/