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

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

maj par rapport a cvs

File size: 2.9 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 QTHOME
50    QTHOME  := /sw
51  endif
52  ifndef QTFLAGS
53    QTFLAGS   := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
54    MOC       := $(QTHOME)/bin/moc
55  endif
56  ifndef QTLIBS
57    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
58    QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
59    QT4LIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
60    QTLIBS     := $(shell test -f $(QTHOME)/lib/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
61  endif
62  ifndef XAWFLAGS
63    XAWFLAGS   := -I/sw/include
64#   XAWFLAGS   := -I/usr/X11R6/include         ##### some installations.
65  endif
66  ifndef XAWLIBS
67    XAWLIBS    := -lXaw
68  endif
69  DLDLIBS   := -ldl
70  ifndef OGLHOME
71    OGLHOME  := /usr/X11R6
72  endif
73  ifndef OGLFLAGS
74    OGLFLAGS  := -I$(OGLHOME)/include
75  endif
76  ifndef OGLLIBS
77    OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
78# Uncomment the following lines for building on MacOSX 10.5 "Leopard"
79#    OGLLIBS   += -dylib_file \
80#                 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
81#                 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
82  endif
83
84  define build-granular-shared-lib
85    @libdir=`(cd $(@D);/bin/pwd)`; \
86     cd $(G4TMPDIR); \
87     g++ -dynamiclib -single_module -undefined dynamic_lookup \
88         -o $$libdir/$(@F) $(INTYLIBS) *.o
89  endef
90  define build-global-shared-lib
91    @libdir=`(cd $(@D);/bin/pwd)`; \
92     cd $(G4TMP)/$(G4SYSTEM); \
93     g++ -dynamiclib -single_module -undefined dynamic_lookup \
94         -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
95  endef
96
97endif
Note: See TracBrowser for help on using the repository browser.