Commit b04399c2 authored by Daniel Brown's avatar Daniel Brown
Browse files

finishing nicslu optional include

parent 56ec232d
......@@ -6,9 +6,16 @@
# work out the name of the host we're on
HOSTNAME = $(shell uname -n)
#echo "seeting CC=gcc"
#CC ?= gcc
#export CC = gcc
# Set defaults for including NICSLU library
ifeq "$(ARCH)" "mac"
INCLUDE_NICSLU=1
else ifeq "$(ARCH)" "linux"
INCLUDE_NICSLU=1
else ifeq "$(ARCH)" "win"
INCLUDE_NICSLU=0
else
#$(error Couldn't determine ARCH)
endif
ARCH=linux
......@@ -36,7 +43,7 @@ src: lib
$(MAKE) --directory=$@ ARCH=$(ARCH) INCLUDE_NICSLU=$(INCLUDE_NICSLU) kat
debug: lib
$(MAKE) --directory=src ARCH=$(ARCH) $@
$(MAKE) --directory=src ARCH=$(ARCH) INCLUDE_NICSLU=$(INCLUDE_NICSLU) $@
prof: lib
$(MAKE) --directory=src ARCH=$(ARCH) $@
......
......@@ -89,17 +89,17 @@ FORMULC_OBJECTS = ../lib/formulc/formulc.o ../lib/formulc/random.o
KLU_LIBS = ../lib/KLUsparse/KLU/Lib/libklu.a ../lib/KLUsparse/BTF/Lib/libbtf.a ../lib/KLUsparse/COLAMD/Lib/libcolamd.a ../lib/KLUsparse/AMD/Lib/libamd.a
LIBS += $(KLU_LIBS)
ifdef $(INCLUDE_NICSLU)
echo "INCLUDING NICSLU"
ifeq "$(INCLUDE_NICSLU)" "1"
NICSLU_INCLUDES = -I../lib/NICSLU/include/
INCLUDES += -I. $(NICSLU_INCLUDES)
NICSLU_LIBS = ../lib/NICSLU/lib/nicsluc.a
LIBS += $(NICSLU_LIBS)
BASE_CFLAGS += -DINCLUDE_NICSLU=1
endif
NICSLU_LIBS = ../lib/NICSLU/lib/nicsluc.a
LIBS += $(NICSLU_LIBS)
SERVER_LIBS = ../lib/libkatnet/libkatnet.a ../lib/libMNet/libMNet.a
LIBS += $(SERVER_LIBS)
......@@ -159,11 +159,24 @@ default: kat
# make all
all: kat win test versionnumber
# Information on the build inclusions should be printed here
msgs:
@echo --------------------------------------
@echo BUILD OPTIONS
@echo --------------------------------------
ifeq "$(INCLUDE_NICSLU)" "1"
@echo Including NICSLU
else
@echo NOT including NICSLU
endif
@echo --------------------------------------
### unix targets ###
# make kat
kat: PROG = ../kat
kat: config $(PREREQS)
kat: msgs config $(PREREQS)
$(CC) $(FAST_CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
# make fast
......@@ -174,7 +187,7 @@ fast: kat
# make debug
debug: CFLAGS = $(DEBUG_CFLAGS)
debug: PROG = ../kat
debug: config $(PREREQS)
debug: msgs config $(PREREQS)
$(CC) $(CFLAGS) ${GSL_CFLAGS} -o $(PROG) $(OBJECTS) $(LIBS) $(LDFLAGS) ${GSL_LIBS} ${CUBA_CFLAGS}
# make nodebug
......
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