X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FMakefile;h=033d2db784931cc4fc64ef14d2986ec3d8c737c0;hb=c962841f40d731bd67b143468504c39748792923;hp=aaec1e9d3f4cd4306492cfa4fdb11058bfd38e3d;hpb=04d9faacbe9e1e71d48758f88fde5e56d4f64980;p=SXSI%2Flibcds.git diff --git a/src/Makefile b/src/Makefile index aaec1e9..033d2db 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 +else +#POPCOUNT_FLAG=-DHAS_POPCOUNT_TABLE + POPCOUNT_FLAG= +endif + +CPPFLAGS=-O3 -Wall -DNDEBUG -fno-PIC $(POPCOUNT_FLAG) -flto INCL=-I../includes/