Makefile 1.33 KB
Newer Older
Jean-Eric Campagne's avatar
Jean-Eric Campagne committed
1 2 3 4 5 6
include $(SOPHYABASE)/include/sophyamake.inc

# ===== Libsharp =====
SHARPDIR = /Users/campagne/Travail/kits/libsharp-code/auto/
SHARPLIB = $(SHARPDIR)/lib
SHARPINC = $(SHARPDIR)/include
7 8 9 10 11
SHARPLIBN = -lsharp -lc_utils -lfftpack 

# ===== NTL
NTLLIB =   /opt/local/lib/libntl.a 

Jean-Eric Campagne's avatar
Jean-Eric Campagne committed
12 13

CPPFLAGS  += -I$(SHARPINC) -I/opt/local/include
14
LDFLAGS += -L$(SHARPLIB) $(SHARPLIBN) $(NTLLIB) -lm
Jean-Eric Campagne's avatar
Jean-Eric Campagne committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73

OBJ = ./Objs/
EXE = ./Objs/

#  Define our target list
.PHONY: default
default: tstlag

.PHONY: all 
all : tstlag

.PHONY: tidy
tidy : 
	rm *~

.PHONY: clean
clean :
	rm -f ./Objs/*

#C++ common Objects
CXXOBJ = $(OBJ)laguerreBuilder.o \
	$(OBJ)laguerreTransform.o \
	$(OBJ)lagSphericTransform.o

#C++ common Headers
CXXHDR = laguerreBuilder.h \
	laguerreTransform.h \
	lagSphericTransform.h \
	extrafunctions.h

CXXFLAGS = -Wa,-q -march=native  -fopenmp -fno-common -O3
CXXCOMPILE = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c 

#LDFLAGS +=  $(OPENMP) -lm


#C++ rule for compiling
$(OBJ)%.o: %.cc $(CXXHDR)
	echo "compile... $@ depend $^"
	$(CXXCOMPILE) -c $< -o $@

######################
.PHONY:  tstlag
tstlag: $(EXE)tstlag
	echo '---- tstlag made'

$(EXE)tstlag : $(OBJ)tstlag.o $(CXXOBJ)
	echo "Link..."
	$(CXXLINK) -o $@ $(OBJ)tstlag.o  $(CXXOBJ) $(LDFLAGS) $(SOPHYAEXTSLBLIST)

$(OBJ)tstlag.o: tstlag.cc $(CXXHDR)
	echo "compile... $@"
	$(CXXCOMPILE) $(FFLAGS) -c $< -o $@