src/Makefile | 34 +++++++++++++++++----------------- src/lasieve4/Makefile | 6 +++--- src/pol5/Makefile | 8 ++++---- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/Makefile b/src/Makefile index 01f66be..59b433f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,15 +1,15 @@ # Workaround for PPC # Due to unknown reason -march isn't supported there ifeq ($(ARCH),970) - ALLOPT=-mcpu=$(ARCH) -m64 -pipe + ALLOPT= else - ALLOPT=-march=$(ARCH) -pipe + ALLOPT= endif INC=-I. -I.. -I../include $(LOCALINC) LIBS=-lgmp -lm BINDIR=../bin -LIBFLAGS=$(LOCALLIB) +LDFLAGS+=$(LOCALLIB) MATBUILD_TPIE=0 TPIE_DIR=../../tpie @@ -17,7 +17,7 @@ TPIE_DIR=../../tpie # Turn on\off workaround for GMP 4.2 bug # Consult http://swox.com/list-archives/gmp-bugs/2006-May/000475.html # for more info -GMP_BUG=1 +GMP_BUG=0 ifeq ($(HOST),generic) ALLOPT+= -DGGNFS_HOST_GENERIC @@ -32,10 +32,10 @@ ifeq ($(ARCH),prescott) ALLOPT+= -DL2_CACHE_SIZE=1024 endif -DEBUGOPT=-W -Wall -g -pg +DEBUGOPT=-W -Wall -CFLAGS=-DNDEBUG -O3 -funroll-loops -finline-functions \ - -ftracer -fomit-frame-pointer -W -Wall $(ALLOPT) +CFLAGS+=-DNDEBUG \ + -W -Wall $(ALLOPT) # CFLAGS=$(DEBUGOPT) $(ALLOPT) # -ffast-math removed since -funsafe-math-optimizations seems to cause occasional problems, especially in sqrt @@ -71,7 +71,7 @@ endif ifeq ($(MATBUILD_TPIE),1) BINS+= $(BINDIR)/matbuild-tpie INC+= -I$(TPIE_DIR)/include - LIBFLAGS+= -L$(TPIE_DIR)/lib + LDFLAGS+= -L$(TPIE_DIR)/lib LIBS+=-ltpie endif @@ -97,35 +97,35 @@ bins : $(BINS) $(CC) $(CFLAGS) -o $@ -c $*.S $(BINDIR)/sieve : sieve.c clsieve.c $(OBJS) makefb.o - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ $^ $(LIBS) + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(BINDIR)/makefb : makefb.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -D_MAKEFB_STANDALONE -o $@ \ + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -D_MAKEFB_STANDALONE -o $@ \ makefb.c $(OBJS) $(LIBS) $(BINDIR)/procrels : procrels.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ procrels.c $(OBJS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ procrels.c $(OBJS) $(LIBS) $(BINDIR)/matbuild : matbuild.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matbuild.c combparts.c \ + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matbuild.c combparts.c \ $(OBJS) $(LIBS) $(BINDIR)/matbuild-tpie : matbuild.c $(OBJS) - $(CPP) $(INC) $(CFLAGS) $(LIBFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \ + $(CPP) $(INC) $(CFLAGS) $(LDFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \ experimental/combparts_tpie.cpp experimental/llist_tpie.cpp \ $(OBJS) $(LIBS) $(BINDIR)/matprune : matprune.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matprune.c $(OBJS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matprune.c $(OBJS) $(LIBS) $(BINDIR)/matsolve : matsolve.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS) $(BINDIR)/sqrt : sqrt.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS) $(BINDIR)/polyselect : polyselect.c $(OBJS) - $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS) latsiever : $(MAKE) -C lasieve4 diff --git a/src/lasieve4/Makefile b/src/lasieve4/Makefile index 31e05a9..6886b16 100644 --- a/src/lasieve4/Makefile +++ b/src/lasieve4/Makefile @@ -10,8 +10,8 @@ # 6/13/04: Hacked up for use in GGNFS by Chris Monico. INC=-I.. -I../../include $(LOCALINC) -LIBFLAGS=-L. $(LOCALLIB) -CFLAGS+=-Os +LDFLAGS+=-L. $(LOCALLIB) +CFLAGS+= BINDIR=../../bin FACT=prho.o @@ -58,7 +58,7 @@ gnfs-lasieve4eI%.o: gnfs-lasieve4e.c lasieve.h asm/siever-config.h $(BINDIR)/gnfs-lasieve4I%e: gnfs-lasieve4eI%.o $(OBJS) libgmp-aux.a \ asm/liblasieve.a asm/liblasieveI%.a $(FACT) - $(CC) $(CFLAGS) $(INC) $(LIBFLAGS) -o $@ $^ $(LIBS) + $(CC) $(CFLAGS) $(INC) $(LDFLAGS) -o $@ $^ $(LIBS) asm/lib%.a: $(MAKE) -C asm diff --git a/src/pol5/Makefile b/src/pol5/Makefile index 44b08be..e474ffb 100644 --- a/src/pol5/Makefile +++ b/src/pol5/Makefile @@ -1,6 +1,6 @@ BINDIR=../../bin INC=-I.. -I../../include $(LOCALINC) -LIBFLAGS=$(LOCALLIB) +LDFLAGS+=$(LOCALLIB) LIBS=-lm -lgmp CFLAGS2= @@ -46,13 +46,13 @@ all: $(BINS) $(CC) $(INC) -c $(CFLAGS) $(CFLAGS2) $^ $(BINDIR)/pol51m0b: pol51m0b.o $(OBJS) $(OBJS2) - $(CC) $(INC) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBFLAGS) $(LIBS) + $(CC) $(INC) $(LDFLAGS) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBS) $(BINDIR)/pol51m0n: pol51m0n.o $(OBJS) $(OBJS3) - $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS) $(BINDIR)/pol51opt: pol51opt.o $(OBJS) $(OBJS4) - $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS) + $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS) clean : ; rm -f $(BINS) *.o core