source: trunk/environments/g4py/config/sys/linuxx8664gcc.gmk @ 1342

Last change on this file since 1342 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 2.2 KB
Line 
1# $Id: linuxx8664gcc.gmk,v 1.9 2008/12/01 10:14:36 kmura Exp $
2# $Name: geant4-09-04-beta-01 $
3# ===========================================================
4#   System specific terms
5# ===========================================================
6
7# compile flags
8CXX      := g++ -m64
9
10ifdef COMPILE_WITH_BOOST
11  CXXFLAGS := -fPIC -ftemplate-depth-255 -finline-functions -Wno-inline
12  CXXFLAGS += -fpermissive
13  CXXFLAGS += -DBOOST_PYTHON_DYNAMIC_LIB
14  CXXFLAGS += -O2
15  ifndef DEBUG
16    CXXFLAGS += -DNDEBUG
17  endif
18else
19  CXXFLAGS := -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
20  CXXFLAFS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
21  CXXFLAGS += -fPIC
22  CXXFLAGS += -O2
23endif
24
25ifdef COMPILE_G4PY
26  CXXFLAGS := -fPIC -ansi -pipe
27  CXXFLAGS += -ftemplate-depth-255 -finline-functions
28  CXXFLAGS += -fpermissive
29  CXXFLAGS += -DBOOST_PYTHON_DYNAMIC_LIB
30  CXXFLAGS += -O2
31  ifndef DEBUG
32    CXXFLAGS += -DNDEBUG
33  endif
34endif
35
36# extention of shared library
37soext  := so
38modext := so
39
40# implicit rules
41%.o: %.cc
42ifdef CPPVERBOSE
43        $(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $*.cc
44else
45        @echo Compiling $< ...
46        @$(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $*.cc
47endif
48
49%.pyc: %.py;  python -c 'import py_compile; py_compile.compile( "$<" )'
50%.pyo: %.py;  python -O -c 'import py_compile; py_compile.compile( "$<" )'
51
52
53# building a shared library
54ifdef Q_BOOST_LIBDIR
55  rpath0 := $(Q_BOOST_LIBDIR)
56endif
57
58ifdef COMPILE_G4PY
59  rpath1 := $(Q_G4_LIBDIR)
60  ifneq ($(Q_CLHEP_LIBDIR), $(Q_G4_LIBDIR))
61    rpath2 := $(Q_CLHEP_LIBDIR)
62  endif
63endif
64
65ifdef G4PY_EXLIB_LIBDIR
66  rpath3 := $(G4PY_EXLIB_LIBDIR)
67endif
68
69rpathflag := -Wl,-rpath,$(rpath0):$(rpath1):$(rpath2):$(rpath3)
70
71ifdef CPPVERBOSE
72  define build-library
73    $(CXX) $(rpathflag) -Wl,-soname,$@ -shared -o $@ $(objects)
74  endef
75else
76  define build-library
77    @echo Building a library $@ ...
78    @$(CXX) $(rpathflag) -Wl,-soname,$@ -shared -o $@ $(objects)
79  endef
80endif
81
82ifdef CPPVERBOSE
83  define build-module
84    $(CXX) $(rpathflag) -Wl,-soname,$@ -shared -o $@ $(objects) $(LOPT)
85  endef
86else
87  define build-module
88    @echo Building a module $@ ...
89    @$(CXX) $(rpathflag) -Wl,-soname,$@ -shared -o $@ $(objects) $(LOPT)
90  endef
91endif
92
Note: See TracBrowser for help on using the repository browser.