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 | # |
---|
10 | ifeq ($(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 | 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 QTFLAGS |
---|
46 | QTHOME := /usr/local/Qt/4.2.2 |
---|
47 | QTFLAGS := -I$(QTHOME)/lib/QtCore.framework/Versions/Current/Headers -I$(QTHOME)/lib/QtGui.framework/Versions/Current/Headers -I$(QTHOME)/lib/QtOpenGL.framework/Versions/Current/Headers -I$(QTHOME)/lib/QtSql.framework/Versions/Current/Headers -I$(QTHOME)/lib/QtXml.framework/Versions/Current/Headers -F$(QTHOME)/lib |
---|
48 | MOC := $(QTHOME)/bin/moc |
---|
49 | endif |
---|
50 | ifndef XMLIBS |
---|
51 | XMLIBS := -L/sw/lib -lXm -lXpm |
---|
52 | # XMLIBS := -L/usr/X11R6/lib -lXm -lXpm ##### some installations. |
---|
53 | endif |
---|
54 | ifndef QTLIBS |
---|
55 | QTHOME := /usr/local/Qt/4.2.2 |
---|
56 | QTLIBS := -F$(QTHOME)/lib -framework QtCore -framework QtGui -framework QtOpenGL -framework QtSql -framework QtXml |
---|
57 | endif |
---|
58 | ifndef XAWFLAGS |
---|
59 | XAWFLAGS := -I/sw/include |
---|
60 | # XAWFLAGS := -I/usr/X11R6/include ##### some installations. |
---|
61 | endif |
---|
62 | ifndef XAWLIBS |
---|
63 | XAWLIBS := -lXaw |
---|
64 | endif |
---|
65 | DLDLIBS := -ldl |
---|
66 | ifndef OGLHOME |
---|
67 | OGLHOME := /usr/X11R6 |
---|
68 | endif |
---|
69 | ifndef OGLFLAGS |
---|
70 | OGLFLAGS := -I$(OGLHOME)/include |
---|
71 | endif |
---|
72 | ifndef OGLLIBS |
---|
73 | OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL |
---|
74 | endif |
---|
75 | |
---|
76 | define build-granular-shared-lib |
---|
77 | @libdir=`(cd $(@D);/bin/pwd)`; \ |
---|
78 | cd $(G4TMPDIR); \ |
---|
79 | g++ -dynamiclib -single_module -undefined dynamic_lookup \ |
---|
80 | -o $$libdir/$(@F) $(INTYLIBS) *.o |
---|
81 | endef |
---|
82 | define build-global-shared-lib |
---|
83 | @libdir=`(cd $(@D);/bin/pwd)`; \ |
---|
84 | cd $(G4TMP)/$(G4SYSTEM); \ |
---|
85 | g++ -dynamiclib -single_module -undefined dynamic_lookup \ |
---|
86 | -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o); |
---|
87 | endef |
---|
88 | |
---|
89 | endif |
---|