Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jean-Eric Campagne
LagSHT
Commits
b5c384a6
Commit
b5c384a6
authored
Apr 13, 2015
by
Jean-Eric Campagne
Browse files
(JEC) 13/4/15 adapt Makefile
parent
51f1391f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
20 deletions
+60
-20
Darwin_g++_omp_make.inc
Darwin_g++_omp_make.inc
+41
-0
Linux_g++_make.inc
Linux_g++_make.inc
+8
-9
Makefile
Makefile
+11
-11
No files found.
Darwin_g++_omp_make.inc
0 → 100644
View file @
b5c384a6
# 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
Linux_g++_make.inc
View file @
b5c384a6
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
...
...
Makefile
View file @
b5c384a6
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
$@
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment