source: trunk/environments/g4py/config/sys/macosx.gmk @ 1337

Last change on this file since 1337 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: macosx.gmk,v 1.5 2008/12/01 06:47:39 kmura Exp $
2# $Name: geant4-09-04-beta-01 $
3# ===========================================================
4#   System specific terms
5#
6#   MacOSX 10.4 (Tiger/Leopard) gcc 4.0.1
7#   Note: gc-3.3 is not valid for this setup.
8# ===========================================================
9
10# compile flags
11CXX      := g++
12
13ifdef COMPILE_WITH_BOOST
14  CXXFLAGS := -ftemplate-depth-256 -Wno-long-double
15  CXXFLAGS += -no-cpp-precomp -finline-functions -Wno-inline
16  CXXFLAGS += -DBOOST_PYTHON_DYNAMIC_LIB
17  CXXFLAGS += -O2
18  ifndef DEBUG
19    CXXFLAGS += -DNDEBUG
20  endif
21else
22  CXXFLAGS  := -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
23  CXXFLAGS  += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
24  CXXFLAGS  += -O2
25endif
26
27ifdef COMPILE_G4PY
28  CXXFLAGS := -ansi -pipe 
29  CXXFLAGS += -ftemplate-depth-256 -Wno-long-double
30  CXXFLAGS += -no-cpp-precomp -finline-functions -Wno-inline
31  CXXFLAGS += -DBOOST_PYTHON_DYNAMIC_LIB
32  CXXFLAGS += -O2
33  ifndef DEBUG
34    CXXFLAGS += -DNDEBUG
35  endif
36endif
37
38# extention of shared library
39soext  := dylib
40modext := so
41
42# implicit rules
43%.o: %.cc
44ifdef CPPVERBOSE
45        $(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $*.cc
46else
47        @echo Compiling $< ...
48        @$(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $*.cc
49endif
50
51%.pyc: %.py;  python -c 'import py_compile; py_compile.compile( "$<" )'
52%.pyo: %.py;  python -O -c 'import py_compile; py_compile.compile( "$<" )'
53
54
55# building a shared library
56ifdef LOCALLIB
57  install_path := $(PWD)
58else
59  install_path := $(Q_LIBDIR)
60endif
61
62
63ifdef CPPVERBOSE
64  define build-library
65    $(CXX) -dynamiclib -single_module -undefined dynamic_lookup \
66      -o $@ -install_name $(install_path)/$@ $(objects)
67  endef
68else
69  define build-library
70    @echo Building a module $@ ...
71    @$(CXX) -dynamiclib -single_module -undefined dynamic_lookup \
72      -o $@ -install_name $(install_path)/$@  $(objects)
73  endef
74endif
75
76# building a module
77ifdef CPPVERBOSE
78  define build-module
79    $(CXX) -Wl,-x -bundle -flat_namespace -dead_strip \
80      -o $@ $(objects) $(LOPT)
81  endef
82else
83  define build-module
84    @echo Building a module $@ ...
85    @$(CXX) -Wl,-x -bundle -flat_namespace -dead_strip \
86      -o $@ $(objects) $(LOPT)
87  endef
88endif
89
Note: See TracBrowser for help on using the repository browser.