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

(JEC) 13/4/15 adapt Makefile

parent 51f1391f
# Flag preprocesseur
CPPFLAGS = -DDarwin -I/opt/local/include
# Def compilateur C et flags
CC = gcc
# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
CFLAGS = -fno-common -g -O -fPIC
# With optimization flags
# CFLAGS = -fno-common -g -fastf -mtune=G5 -fPIC
# Def compilateur C++ et flags
CXX = g++
#JEC add -fopenmp -O3 -Wa,-q
CXXFLAGS = -fno-common -g -O3 -fPIC -fopenmp -Wa,-q
# flags specifiques pour templates repository...
CXXTEMPFLG =
# Compilo fortran
FC = gfortran
FFLAGS =
# Pour fabriquer les lib .a
AR = libtool
ARFLAGS = -static -o
# Ordres de compilation
CCOMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) -c
CXXCOMPILE = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
FCCOMPILE = $(FC) $(FFLAGS) -c
# Extension de nom pour les librairies partagees
SLEXT = dylib
# Fabrication de librairies partagees
CMDSHLCXX = $(CXX) $(CXXFLAGS) $(CXXTEMPFLG) -dynamiclib
LIBFORT =
# Commande de link pour creation d'executables
CXXLINK = $(CXX) $(CXXFLAGS) -bind_at_load
# Commande de link pour creation de module pouvant etre charge dynamiquement
CXXDLL = $(CXX) $(CXXFLAGS) -bundle
GCCDIR = /opt/rh/devtoolset-3/root/usr/bin/
#GCCDIR = /opt/rh/devtoolset-3/root/usr/bin/
# Flag preprocesseur
CPPFLAGS = -DLinux
CPPFLAGS = -DLinux
# Def compilateur C et flags
CC = $(GCCDIR)gcc
#CC = $(GCCDIR)gcc
CC = gcc
# Replace [CNFPHFLF] by specific compilation flags below (done by configure)
CFLAGS = -Wall -Wpointer-arith -Wmissing-prototypes -O -g -fPIC
# Def compilateur C++ et flags
CXX = $(GCCDIR)g++
#CXX = $(GCCDIR)g++
CXX = g++
# Flag de warning -Wsynth NON inclus par defaut (04/2007)
###CXXFLAGS = -Wall -Wpointer-arith -O -g -fPIC CNFPHFLF
CXXFLAGS = -Wall -Wpointer-arith -O3 -g -fPIC -fopenmp -fno-common
......@@ -17,7 +18,8 @@ CXXFLAGS = -Wall -Wpointer-arith -O3 -g -fPIC -fopenmp -fno-common
CXXTEMPFLG =
# Compilo fortran
#FC = g77
FC = $(GCCDIR)gfortran
#FC = $(GCCDIR)gfortran
FC = gfortran
FFLAGS =
# Pour fabriquer les lib .a
AR = ar
......@@ -34,9 +36,6 @@ SLEXT = so
CMDSHLCXX = $(CXX) $(CXXFLAGS) $(CXXTEMPFLG) -shared
# Liste de librairie de base, necessaire pour libsophya
#SOPBASELIBS = -lstdc++ -lpthread -lm -lc -ldl
#LIBFORT = -lg2c
LIBFORT = -lgfortran
......
include Linux_g++_make.inc
#include Linux_g++_make.inc
include Darwin_g++_omp_make.inc
# ===== Libsharp =====
SHARPDIR = /exp/opera/kits/libsharp-code/auto/
#SHARPDIR = <yourdir>/libsharp-code/auto/
SHARPDIR = /Users/campagne/Travail/kits/libsharp-code/auto
SHARPLIB = $(SHARPDIR)/lib
SHARPINC = $(SHARPDIR)/include
SHARPLIBN = -lsharp -lc_utils -lfftpack
......@@ -53,22 +57,18 @@ CXXHDR = lagsht_exceptions.h \
walltimer.h
#CXX = g++
#CPPFLAGS = -DDarwin
#CXXFLAGS = -Wa,-q -march=native -fno-common -O3 -fopenmp
CPPFLAGS += -I$(SHARPINC) -I/opt/local/include
CPPFLAGS += -I$(SHARPINC)
LDFLAGS += -L$(SHARPLIB) $(SHARPLIBN) -lm
#CXXCOMPILE = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c
#CXXLINK = $(CXX) $(CXXFLAGS) -bind_at_load
#C++ rule for compiling
$(OBJ)%.o: %.cc $(CXXHDR)
echo "compile... $@ depend $^",
$(CXXCOMPILE) -c $< -o $@
echo "compile... $<",
$(CXXCOMPILE) $< -o $@
######################
.PHONY: lagsht_testsuite
......@@ -80,8 +80,8 @@ $(EXE)lagsht_testsuite : $(OBJ)lagsht_testsuite.o $(CXXOBJ)
$(CXXLINK) -o $@ $(OBJ)lagsht_testsuite.o $(CXXOBJ) $(LDFLAGS)
$(OBJ)lagsht_testsuite.o: lagsht_testsuite.cc $(CXXHDR)
echo "compile... $@"
$(CXXCOMPILE) -c $< -o $@
echo "compile... $<"
$(CXXCOMPILE) $< -o $@
......
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