source: trunk/geant4/config/sys/Darwin-g++.gmk @ 790

Last change on this file since 790 was 790, checked in by garnier, 16 years ago

r818@wl-72126: garnier | 2008-04-30 12:42:00 +0200
modif mise a jour sur le cvs

File size: 3.3 KB
Line 
1#
2# ------ MacOS-X ------
3#                                 MacOS 10.3 gcc-3.3
4#                                 MacOS 10.4 gcc-4.0
5#
6# Original author: Helmut Burkhardt - CERN
7#       Revisions: Guy Barrand - LAL
8#                  Gabriele Cosmo - CERN
9#
10ifeq ($(G4SYSTEM),Darwin-g++)
11  CXX       := g++
12  CXXFLAGS  := -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
13  CXXFLAGS  += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
14  ifdef G4OPTIMISE
15    CXXFLAGS  += -O2
16    FCFLAGS   := -O2
17    CCFLAGS   := -O2
18  else
19    ifdef G4DEBUG
20      CXXFLAGS  += -g
21      FCFLAGS   := -g
22      CCFLAGS   := -g
23    endif
24  endif
25  ifdef G4PROFILE
26    CXXFLAGS  += -pg
27    FCFLAGS   += -pg
28    CCFLAGS   += -pg
29  endif
30  FC := gfortran
31  FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
32  LDFLAGS += -bind_at_load
33  FCLIBS := -lg2c -lnsl
34  SHEXT   := dylib
35  ifndef X11FLAGS
36    X11FLAGS  := -I/usr/include/X11/extensions -I/usr/include/X11
37  endif
38  ifndef X11LIBS
39    X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
40  endif
41  ifndef XMFLAGS
42    XMFLAGS   := -I/sw/include
43#   XMFLAGS   := -I/usr/X11R6/include          ##### some installations.
44  endif
45  ifndef XMLIBS
46    XMLIBS    := -L/sw/lib -lXm -lXpm
47#   XMLIBS    := -L/usr/X11R6/lib -lXm -lXpm   ##### some installations.
48  endif
49  ifndef XAWFLAGS
50    XAWFLAGS   := -I/sw/include
51#   XAWFLAGS   := -I/usr/X11R6/include         ##### some installations.
52  endif
53  ifndef XAWLIBS
54    XAWLIBS    := -lXaw
55  endif
56  DLDLIBS   := -ldl
57  ifndef OGLHOME
58    OGLHOME  := /usr/X11R6
59  endif
60  ifndef OGLFLAGS
61    OGLFLAGS  := -I$(OGLHOME)/include
62  endif
63  ifndef OGLLIBS
64    OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
65# Uncomment the following lines for building on MacOSX 10.5 "Leopard"
66#    OGLLIBS   += -dylib_file \
67#                 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
68#                 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
69  endif
70  ifndef QTHOME
71    QTHOME     := /sw
72  endif
73  ifndef QTFLAGS
74    QTFLAGS    := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
75  endif
76  ifndef QTMOC
77    QTMOC      := $(QTHOME)/bin/moc
78  endif
79  ifndef QTLIBS
80    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
81    QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
82    QT4LIBS    += -framework QtSql -framework QtXml
83    QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
84  endif
85
86  ifndef GLQTLIBS
87    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
88    QT4LIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
89    QT4LIBS    += -D GLQTLIBS -framework QtOpenGL -framework QtSql -framework QtXml -D ENDOF_GLQTLIBS
90    GLQTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
91  endif
92
93  define build-granular-shared-lib
94    @libdir=`(cd $(@D);/bin/pwd)`; \
95     cd $(G4TMPDIR); \
96     g++ -dynamiclib -single_module -undefined dynamic_lookup \
97         -o $$libdir/$(@F) $(INTYLIBS) *.o
98  endef
99  define build-global-shared-lib
100    @libdir=`(cd $(@D);/bin/pwd)`; \
101     cd $(G4TMP)/$(G4SYSTEM); \
102     g++ -dynamiclib -single_module -undefined dynamic_lookup \
103         -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
104  endef
105
106endif
Note: See TracBrowser for help on using the repository browser.