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

(JEC) 8/5/15 organize the code with src/bin/lib/doc directories

parent dcf66d72
......@@ -25,9 +25,11 @@ SHARPLIB = $(SHARPDIR)/lib
SHARPINC = -I$(SHARPDIR)/include
SHARPLIBN = -L$(SHARPLIB) -lsharp -lc_utils -lfftpack
OBJ = ./Objs/
EXE = ./Objs/
SRC = ./src/
LIB = ./lib/
OBJ = ./objs/
EXE = ./bin/
DATA = ./data/
# Define our target list
.PHONY: default
......@@ -38,14 +40,16 @@ all : makedir lib lagsht_testsuite
.PHONY: check
check : makedir lagsht_testsuite
$(OBJ)lagsht_testsuite -t 1 -n 1024
@paste lagWeights-1024-Func.txt 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 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}'
$(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}'
.PHONY: makedir
makedir :
mkdir -p $(OBJ)
mkdir -p $(EXE)
mkdir -p $(LIB)
.PHONY: tidy
tidy :
......@@ -54,6 +58,8 @@ tidy :
.PHONY: clean
clean :
rm -f $(OBJ)/*
rm -f $(EXE)/*
rm -f $(LIB)/*
#C++ common Objects
CXXOBJ = $(OBJ)laguerreBuilder.o \
......@@ -70,16 +76,16 @@ CXXSHOBJ = laguerreBuilder.o \
#C++ common Headers
CXXHDR = lagsht_exceptions.h \
lagsht_numbers.h \
lagsht_utils.h \
lagsht_geom.h \
lagsht_spheregeom.h \
lagsht_healpixhelper.h \
laguerreBuilder.h \
laguerreTransform.h \
lagSphericTransform.h \
walltimer.h
CXXHDR = $(SRC)lagsht_exceptions.h \
$(SRC)lagsht_numbers.h \
$(SRC)lagsht_utils.h \
$(SRC)lagsht_geom.h \
$(SRC)lagsht_spheregeom.h \
$(SRC)lagsht_healpixhelper.h \
$(SRC)laguerreBuilder.h \
$(SRC)laguerreTransform.h \
$(SRC)lagSphericTransform.h \
$(SRC)walltimer.h
......@@ -89,7 +95,7 @@ LDFLAGS += $(SHARPLIBN) $(BLASLIBN) -lm
#C++ rule for compiling
$(OBJ)%.o: %.cc $(CXXHDR)
$(OBJ)%.o: $(SRC)%.cc $(CXXHDR)
echo "compile... $<",
$(CXXCOMPILE) $< -o $@
......@@ -98,11 +104,11 @@ $(OBJ)%.o: %.cc $(CXXHDR)
sharelib : $(CXXOBJ)
echo $(CXXSHOBJ) ; \
cd $(OBJ); \
$(CMDSHLCXX) -o $liblagsht.$(SLEXT) $(CXXSHOBJ) $(LDFLAGS)
$(CMDSHLCXX) -o $(LIB)liblagsht.$(SLEXT) $(CXXSHOBJ) $(LDFLAGS)
.PHONY: lib
lib : $(OBJ)liblagsht.a
lib : $(LIB)liblagsht.a
$(OBJ)liblagsht.a : $(CXXOBJ)
$(LIB)liblagsht.a : $(CXXOBJ)
$(AR) $(ARFLAGS) $@ $?
######################
......@@ -114,22 +120,22 @@ $(EXE)lagsht_testsuite : $(OBJ)lagsht_testsuite.o $(CXXOBJ)
echo "Link..."
$(CXXLINK) -o $@ $(OBJ)lagsht_testsuite.o $(CXXOBJ) $(LDFLAGS)
$(OBJ)lagsht_testsuite.o: lagsht_testsuite.cc $(CXXHDR)
$(OBJ)lagsht_testsuite.o: $(SRC)lagsht_testsuite.cc $(CXXHDR)
echo "compile... $<"
$(CXXCOMPILE) $< -o $@
######################
.PHONY: fullcheck
fullcheck :
./Objs/lagsht_testsuite -t 0
./Objs/lagsht_testsuite -t 1 -n 1024
./Objs/lagsht_testsuite -t 2 -n 128
./Objs/lagsht_testsuite -t 3 -l 512 -g ECP
./Objs/lagsht_testsuite -t 3 -l 512 -g Gauss
./Objs/lagsht_testsuite -t 3 -l 512 -g Healpix
./Objs/lagsht_testsuite -t 4 -l 1024 -n 128 -nphi 2048 -g ECP
./Objs/lagsht_testsuite -t 4 -l 1024 -n 128 -nphi 2048 -g Gauss
./Objs/lagsht_testsuite -t 4 -l 1024 -n 128 -ntheta 512 -g Healpix
$(EXE)lagsht_testsuite -t 0
$(EXE)lagsht_testsuite -t 1 -n 1024
$(EXE)lagsht_testsuite -t 2 -n 128
$(EXE)lagsht_testsuite -t 3 -l 512 -g ECP
$(EXE)lagsht_testsuite -t 3 -l 512 -g Gauss
$(EXE)lagsht_testsuite -t 3 -l 512 -g Healpix
$(EXE)lagsht_testsuite -t 4 -l 1024 -n 128 -nphi 2048 -g ECP
$(EXE)lagsht_testsuite -t 4 -l 1024 -n 128 -nphi 2048 -g Gauss
$(EXE)lagsht_testsuite -t 4 -l 1024 -n 128 -ntheta 512 -g Healpix
......
......@@ -754,7 +754,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT =
INPUT = . ../src
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......
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