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

Last change on this file since 474 was 472, checked in by garnier, 17 years ago

r549@wl-72148: laurentgarnier | 2007-05-15 10:37:42 +0200
import de geant4

File size: 2.2 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 := g77
31  FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
32  LDFLAGS += -bind_at_load
33  FCLIBS := -lg2c -lnsl
34  ECHO    := /bin/echo -n
35  SHEXT   := dylib
36  ifndef X11FLAGS
37    X11FLAGS  := -I/usr/include/X11/extensions -I/usr/include/X11
38  endif
39  ifndef X11LIBS
40    X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
41  endif
42  ifndef XMFLAGS
43    XMFLAGS   := -I/sw/include
44#   XMFLAGS   := -I/usr/X11R6/include          ##### some installations.
45  endif
46  ifndef XMLIBS
47    XMLIBS    := -L/sw/lib -lXm -lXpm
48#   XMLIBS    := -L/usr/X11R6/lib -lXm -lXpm   ##### some installations.
49  endif
50  ifndef XAWFLAGS
51    XAWFLAGS   := -I/sw/include
52#   XAWFLAGS   := -I/usr/X11R6/include         ##### some installations.
53  endif
54  ifndef XAWLIBS
55    XAWLIBS    := -lXaw
56  endif
57  DLDLIBS   := -ldl
58  ifndef OGLHOME
59    OGLHOME  := /usr/X11R6
60  endif
61  ifndef OGLFLAGS
62    OGLFLAGS  := -I$(OGLHOME)/include
63  endif
64  ifndef OGLLIBS
65    OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
66  endif
67
68  define build-granular-shared-lib
69    @libdir=`(cd $(@D);/bin/pwd)`; \
70     cd $(G4TMPDIR); \
71     g++ -dynamiclib -single_module -undefined dynamic_lookup \
72         -o $$libdir/$(@F) $(INTYLIBS) *.o
73  endef
74  define build-global-shared-lib
75    @libdir=`(cd $(@D);/bin/pwd)`; \
76     cd $(G4TMP)/$(G4SYSTEM); \
77     g++ -dynamiclib -single_module -undefined dynamic_lookup \
78         -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
79  endef
80
81endif
Note: See TracBrowser for help on using the repository browser.