X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=Makefile;h=f639648a9b49f7b9d4a798e539a598c72f35206e;hb=HEAD;hp=23cd4f646f532886d2c28ed0457308ff1a6b9398;hpb=7e784b76fbed5924499b586bedeb51057f62e05f;p=SXSI%2Flibbp.git diff --git a/Makefile b/Makefile index 23cd4f6..f639648 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ POPCOUNT=$(shell grep -q popcnt /proc/cpuinfo && echo 1) ifeq ($(POPCOUNT), 1) - POPCOUNT_FLAG=-DHAS_NATIVE_POPCOUNT + POPCOUNT_FLAG=-DHAS_NATIVE_POPCOUNT -mpopcnt else #POPCOUNT_FLAG=-DHAS_POPCOUNT_TABLE POPCOUNT_FLAG= @@ -14,17 +14,23 @@ else endif ifeq ($(DEBUG), true) - OPT_FLAGS=-O0 -g $(POPCOUNT_FLAG) -fno-PIC -static + OPT_FLAGS=-O0 -g $(POPCOUNT_FLAG) -static else - OPT_FLAGS=-O4 $(POPCOUNT_FLAG) -fno-PIC -static + OPT_FLAGS=-O3 $(POPCOUNT_FLAG) -static endif +ifeq ($(PROFILE), true) + PROF_FLAGS=-pg -g +else + PROF_FLAGS= +endif + INC_FLAGS=-I. -CFLAGS= $(INC_FLAGS) $(OPT_FLAGS) -CXXFLAGS= $(INC_FLAGS) $(OPT_FLAGS) -CC=gcc +CFLAGS= $(INC_FLAGS) $(OPT_FLAGS) $(PROF_FLAGS) +CXXFLAGS= $(INC_FLAGS) $(OPT_FLAGS) $(PROF_FLAGS) +CC=g++ OBJECTS_BP=bp.o bp-utils.o bp-darray.o bp-core.o