Commit 7b703d27 authored by Andreas Freise's avatar Andreas Freise
Browse files

removed flags from makefiles.

parent 19ae5b46
......@@ -8,20 +8,20 @@ default : AMD BTF COLAMD KLU
AMD:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
BTF:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
COLAMD:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
KLU:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
# build the KLU package
KLUsparse:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
# cleanup targets
clean:
......
......@@ -79,35 +79,11 @@ ifeq "$(ARCH)" "condor"
CC = condor_compile gcc
endif
ifeq ($(ARCH),win)
CC = $(MINGW_CC)
endif
ifeq "$(CC)" "icc"
CFLAGS = -Wall -O3 -rcd -ip -unroll4 -malign-double -fomit-frame-pointer -DNDEBUG -axN -parallel
else
CFLAGS = -Wall -W -pipe -O3 -ffast-math -fexpensive-optimizations -malign-double -march=$(CPUARCH) -fomit-frame-pointer -funroll-loops -DNDEBUG
endif
#ifeq ($(ARCH),win)
# -Wall -W -pipe -O3 -ffast-math -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -DNDEBUG -march=$(CPUARCH) -mtune=$(CPUARCH)
#endif
ifeq ($(ARCH),mac)
# CFLAGS = -Wall -W -pipe -O3 -arch ppc -arch i686 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -ffast-math -funroll-loops
CFLAGS = -Wall -W -pipe -O3 -arch $(CPUARCH) -mmacosx-version-min=10.5 -ffast-math -fexpensive-optimizations -fomit-frame-pointer -funroll-loops -DNDEBUG
endif
LINTFLAGS = -lc -lm
SHELL = /bin/sh
RANLIB = ranlib
ifeq ($(ARCH),win)
RANLIB = $(MINGW_RANLIB)
endif
ifeq ($(ARCH),mac)
LIB = -lstdc++
BLAS = -framework Accelerate
......
......@@ -4,38 +4,29 @@
.PHONY: clean sparse formulc libkatnet libMNet KLUsparse Cuba-3.0
ifeq "$(ARCH)" "win"
default : sparse formulc KLUsparse Cuba-3.0
else
ifeq "$(ARCH)" "condor"
default : sparse formulc KLUsparse Cuba-3.0
else
default : sparse formulc libkatnet libMNet KLUsparse Cuba-3.0
endif
endif
default : sparse formulc libkatnet libMNet KLUsparse Cuba-3.0
# build the sparse package
sparse:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
libkatnet:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
libMNet:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
# build the formulc package
formulc:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
# build the KLU package
KLUsparse:
$(MAKE) --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) --directory=$@ ARCH=$(ARCH)
# build the cuba package
Cuba-3.0:
$(MAKE) lib --directory=$@ ARCH=$(ARCH) CPUARCH=$(CPUARCH)
$(MAKE) lib --directory=$@ ARCH=$(ARCH)
cp ./Cuba-3.0/cuba.h ../src/
# cleanup targets
clean:
......@@ -43,7 +34,7 @@ clean:
do \
$(MAKE) --directory=$$d clean; \
done
rm ./Cuba-3.0/libcuba.a
rm ./KLUsparse/KLU/Lib/lib*.a
rm ./KLUsparse/COLAMD/Lib/lib*.a
......
.PHONY: formulc
# set the default compiler
ifeq "$(CC)" ""
CC = gcc
endif
ifeq "$(ARCH)" "condor"
CC = condor_compile gcc
endif
ifeq ($(ARCH),win)
CC = $(MINGW_CC)
endif
ifeq "$(CC)" "icc"
CFLAGS = -Wall -O3 -rcd -ipo -unroll -parallel -DNDEBUG -mcpu=$(CPUARCH)
else
CFLAGS = -Wall -W -pipe -O3 -ffast-math -fexpensive-optimizations -malign-double -march=$(CPUARCH) -fomit-frame-pointer -funroll-loops
endif
ifeq ($(ARCH),mac)
# CFLAGS = -Wall -W -pipe -O3 -arch ppc -arch i686 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -ffast-math -fexpensive-optimizations -fomit-frame-pointer -funroll-loops
CFLAGS = -Wall -W -pipe -O3 -arch $(CPUARCH) -mmacosx-version-min=10.5 -ffast-math -fexpensive-optimizations -fomit-frame-pointer -funroll-loops
endif
formulc : formulc.o random.o
#ifeq "$(CC)" "icc"
# $(CC) -o formulc formulc.o standalone.o random.o -lguide -lpthread
#else
# $(CC) -o formulc formulc.o standalone.o random.o -lm
#endif
formumr.o : formulc.c formulc.h
$(CC) -c $(CFLAGS) formulc.c -o formumr.o -DMY_RND
formulc.o : formulc.c formulc.h
......
override CC=gcc
ifeq ($(ARCH),win)
CC = $(MINGW_CC)
endif
AR=ar
ifeq ($(ARCH),win)
AR = $(MINGW_AR)
endif
RANLIB = ranlib
ifeq ($(ARCH),win)
RANLIB = $(MINGW_RANLIB)
endif
TARGET=libMNet.a
HEADER=./mnet.h
SRC=./*.c
OBJS = *.o
BASEFLAGS=-O2 -Wall -g
C_FLAGS = $(BASEFLAGS)
ifeq "$(ARCH)" "mac"
#C_FLAGS = $(BASEFLAGS) -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fomit-frame-pointer -funroll-loops -DNDEBUG
C_FLAGS = $(BASEFLAGS) -arch $(CPUARCH) -fomit-frame-pointer -funroll-loops -DNDEBUG
endif
${TARGET}: ${SRC}
$(CC) ${C_FLAGS} ${INCLUDE} -c ${SRC}
$(CC) ${CFLAGS} ${INCLUDE} -c ${SRC}
$(AR) -qcv ${TARGET} ${OBJS}
$(RANLIB) $(TARGET)
.PHONEY: clean
clean:
......
override CC=gcc
ifeq ($(ARCH),win)
CC = $(MINGW_CC)
endif
AR=ar
ifeq ($(ARCH),win)
AR = $(MINGW_AR)
endif
RANLIB = ranlib
ifeq ($(ARCH),win)
RANLIB = $(MINGW_RANLIB)
endif
TARGET=libkatnet.a
HEADER=katnet.h
SRC=./*.c
OBJS = *.o
BASEFLAGS=-O2 -Wall -pipe
C_FLAGS = $(BASEFLAGS)
ifeq "$(ARCH)" "mac"
# C_FLAGS = $(BASEFLAGS) -arch ppc -arch i686 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fomit-frame-pointer -funroll-loops -DNDEBUG
C_FLAGS = $(BASEFLAGS) -arch $(CPUARCH) -fomit-frame-pointer -funroll-loops -DNDEBUG
endif
${TARGET}: ${SRC}
$(CC) ${C_FLAGS} ${INCLUDE} -c ${SRC}
$(CC) ${CFLAGS} ${INCLUDE} -c ${SRC}
$(AR) -qcv ${TARGET} ${OBJS}
$(RANLIB) $(TARGET)
......
......@@ -4,41 +4,11 @@
# UC Berkeley
#
# set the default compiler
ifeq "$(CC)" ""
CC = gcc
endif
ifeq "$(ARCH)" "condor"
CC = condor_compile gcc
endif
ifeq ($(ARCH),win)
CC = $(MINGW_CC)
endif
ifeq "$(CC)" "icc"
CFLAGS = -Wall -O3 -rcd -ip -unroll -parallel -DNDEBUG -mtune=$(CPUARCH)
else
CFLAGS = -Wall -W -pipe -O3 -ffast-math -fexpensive-optimizations -malign-double -march=$(CPUARCH) -fomit-frame-pointer -funroll-loops
endif
ifeq ($(ARCH),mac)
# CFLAGS = -Wall -W -pipe -O3 -arch ppc -arch i686 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -ffast-math -fexpensive-optimizations -fomit-frame-pointer -funroll-loops
CFLAGS = -Wall -W -pipe -O3 -arch $(CPUARCH) -ffast-math -fexpensive-optimizations -fomit-frame-pointer -funroll-loops
endif
LINTFLAGS = -lc -lm
SHELL = /bin/sh
RANLIB = ranlib
ifeq ($(ARCH),win)
RANLIB = $(MINGW_RANLIB)
endif
HFILES = spConfig.h spDefs.h spMatrix.h
CFILES = spAllocate.c spBuild.c spFactor.c spOutput.c spSolve.c spUtils.c \
spFortran.c
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment