Commit 3c747f1b authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 8/5/15 polish Makefile

parent a5713a67
......@@ -25,7 +25,7 @@ endif
# ===== Libsharp =====
#SHARPDIR = <yourdir>/libsharp-code/auto/
SHARPDIR = /exp/opera/kits/libsharp-code/auto
SHARPDIR = /Users/campagne/Travail/kits/libsharp-code/auto
SHARPLIB = $(SHARPDIR)/lib
SHARPINC = -I$(SHARPDIR)/include
SHARPLIBN = -L$(SHARPLIB) -lsharp -lc_utils -lfftpack
......@@ -44,9 +44,14 @@ default: confcheck makedir lib lagsht_testsuite
.PHONY: all
all : confcheck makedir lib lagsht_testsuite
.PHONY: install
install:
mkdir -p $(INCL)
cp $(SRC)/*.h $(INCL)
.PHONY: check
check : confcheck makedir lagsht_testsuite
check : lagsht_testsuite
$(EXE)lagsht_testsuite -t 1 -n 1024
@paste lagWeights-1024-Func.txt $(DATA)lagWeights-1024-Func.txt.TEST | awk '{x=($$1-$$2)/$$2;y=(x<0?-x:x);if(max==""){max=y};if(y>max){max=y};sum+=(x<0?-x:x)} END {print "Weight Test: Max Err. ",max,"Abs. Relativ. Err =",sum/NR}'
@paste lagNodes-1024-Func.txt $(DATA)lagNodes-1024-Func.txt.TEST | awk '{x=($$1-$$2)/$$2;y=(x<0?-x:x);if(max==""){max=y};if(y>max){max=y};sum+=(x<0?-x:x)} END {print "Nodes Test: Max Err. ",max,"Abs. Relativ. Err =",sum/NR}'
......@@ -54,12 +59,12 @@ check : confcheck makedir lagsht_testsuite
.PHONY: makedir
makedir :
mkdir -p $(OBJ)
mkdir -p $(EXE)
mkdir -p $(LIB)
@mkdir -p $(OBJ)
@mkdir -p $(EXE)
@mkdir -p $(LIB)
confcheck :
echo "Config check mach=<$(MACH)> sharp=<$(SHARPDIR)> blas=<$(BLASDIR)>"
@echo "Config check mach=<$(MACH)> sharp=<$(SHARPDIR)> blas=<$(BLASDIR)>"
ifeq ($(BLAS), 1)
@if [ ! -d "$(BLASDIR)" ]; then \
echo "BLAS directory not defined properly!"; \
......@@ -110,10 +115,6 @@ CXXHDR = $(SRC)lagsht_exceptions.h \
.PHONY: install
install:
mkdir -p $(INCL)
cp $(SRC)/*.h $(INCL)
CPPFLAGS += $(BLASYES) $(SHARPINC) $(BLASINC)
LDFLAGS += $(SHARPLIBN) $(BLASLIBN) -lm
......
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