X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FMakefile;h=9812eac3e7fee87f4a76466e32c21f620f22e0e9;hb=f485a898fccde5f6beb9d9b31be4afe973ad627b;hp=aaec1e9d3f4cd4306492cfa4fdb11058bfd38e3d;hpb=3fd4bcef236556c7f3bff1d2be8d3f4206245501;p=SXSI%2Flibcds.git diff --git a/src/Makefile b/src/Makefile index aaec1e9..9812eac 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,14 @@ CPP=g++ +POPCOUNT=$(shell grep -q popcnt /proc/cpuinfo && echo 1) -CPPFLAGS=-O3 -Wall -DNDEBUG -fno-PIC +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 INCL=-I../includes/