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

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

r647@mac-90108: laurentgarnier | 2007-11-15 11:32:46 +0100
Ok en Qt 4.3.0

File size: 2.6 KB
Line 
1#
2# ------ GNU/LINUX ------ gcc 3.2 and higher
3#
4ifeq ($(G4SYSTEM),Linux-g++)
5 CXX := g++
6 CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
7 CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
8#
9# Uncomment the following options to activate Pentium4 chip specific
10# floating-point operations on the SSE unit. It will allow for more stable
11# results (no output differences between debug/optimised runs) and little
12# performance improvement (in the order of 2%).
13# NOTE: binaries built using these options will NOT be portable cross
14# platforms. Will only run on Pentium4-based architectures !
15#
16# CXXFLAGS += -march=pentium4 -mfpmath=sse
17 ifdef G4OPTIMISE
18 CXXFLAGS += -O2
19 FCFLAGS := -O2
20 CCFLAGS := -O2
21 else
22 ifdef G4DEBUG
23 CXXFLAGS += -g
24 FCFLAGS := -g
25 CCFLAGS := -g
26 endif
27 endif
28 ifdef G4PROFILE
29 CXXFLAGS += -pg
30 FCFLAGS += -pg
31 CCFLAGS += -pg
32 endif
33 ifdef G4LIB_BUILD_SHARED
34 CXXFLAGS += -fPIC
35 FCFLAGS += -fPIC
36 CCFLAGS += -fPIC
37 endif
38 G4RUNPATHOPTION := -Wl,-rpath
39 CC := gcc
40 FC := g77
41 FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
42 FCLIBS := -lg2c -lnsl
43 ECHO := /bin/echo -e
44 SHEXT := so
45 ifndef X11FLAGS
46 X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
47 endif
48 ifndef X11LIBS
49 X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
50 endif
51 ifndef XMFLAGS
52 XMFLAGS := -I/usr/X11R6/include
53 endif
54 ifndef XMLIBS
55 XMLIBS := -lXm -lXpm
56 endif
57 ifndef QTHOME
58 QTHOME := /usr/local/Qt
59 endif
60 ifndef QTFLAGS
61 QTFLAGS := -I$(QTHOME)/include/Qt
62 QTFLAGS += -I$(QTHOME)/include
63 MOC := $(QTHOME)/bin/moc
64 endif
65 ifndef QTLIBS
66 QT3LIBS := -L$(QTHOME)/lib -lqt-mt
67 QT4LIBS := -L$(QTHOME)/lib -lQtCore -lQtGui -lQtOpenGL -lQtSql -lQtXml
68 QTLIBS := $(shell test -f $(QTHOME)/lib/libQt3Support.so && echo $(QT4LIBS) || echo $(QT3LIBS))
69 endif
70 ifndef XAWFLAGS
71 XAWFLAGS := -I/usr/X11R6/include
72 endif
73 ifndef XAWLIBS
74 XAWLIBS := -lXaw
75 endif
76 DLDLIBS := -ldl
77 ifndef OGLFLAGS
78 OGLFLAGS := -I$(OGLHOME)/include
79 endif
80 ifndef OGLLIBS
81 OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
82 endif
83 define build-granular-shared-lib
84 @libdir=`(cd $(@D);/bin/pwd)`; \
85 cd $(G4TMPDIR); \
86 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
87 endef
88 define build-global-shared-lib
89 @libdir=`(cd $(@D);/bin/pwd)`; \
90 cd $(G4TMP)/$(G4SYSTEM); \
91 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
92 $(foreach dir,$(SUBLIBS),$(dir)/*.o);
93 endef
94
95endif
Note: See TracBrowser for help on using the repository browser.