source: trunk/config/sys/WIN32-g++.gmk@ 1158

Last change on this file since 1158 was 1017, checked in by garnier, 17 years ago

amelioration pour Linux

File size: 1.9 KB
Line 
1#
2# ------ GNU/WIN32 CYGWIN ------ !!! not supported !!!
3# Cygnus CygWin - gcc-3.2 and higher
4# Windows XP
5#
6# Stefano Agostinelli (agos001@pn.itnet.it) - IST Group, Genova
7#
8ifeq ($(G4SYSTEM),WIN32-g++)
9 CXX := g++
10 CXXFLAGS := -W -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long
11 CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe
12 ifdef G4OPTIMISE
13 CXXFLAGS += -O
14 FCFLAGS := -O
15 CCFLAGS := -O
16 else
17 ifdef G4DEBUG
18 CXXFLAGS += -g
19 FCFLAGS := -g
20 CCFLAGS := -g
21 endif
22 endif
23 ifdef G4LIB_BUILD_SHARED
24 CXXFLAGS += -fPIC
25 FCFLAGS += -fPIC
26 CCFLAGS += -fPIC
27 endif
28
29 G4RUNPATHOPTION := -Wl,-rpath
30 SHEXT := so
31 ECHO := echo -e
32 GREP := /usr/bin/grep
33 SED := /usr/bin/sed
34 CAT := /usr/bin/cat
35 CUT := /usr/bin/cut
36
37 FC := g77
38 FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
39 FCLIBS := -lg2c -lnsl
40 ifndef X11FLAGS
41 X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
42 endif
43 ifndef X11LIBS
44 X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
45 endif
46 ifndef XMFLAGS
47 XMFLAGS := -I/usr/X11R6/include
48 endif
49 ifndef XMLIBS
50 XMLIBS := -lXm -lXpm
51 endif
52 ifndef XAWFLAGS
53 XAWFLAGS := -I/usr/X11R6/include
54 endif
55 ifndef XAWLIBS
56 XAWLIBS := -lXaw
57 endif
58 ifndef OGLFLAGS
59 OGLFLAGS := -I$(OGLHOME)/include
60 endif
61 ifndef OGLLIBS
62 OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
63 endif
64 define build-granular-shared-lib
65 @libdir=`(cd $(@D);/bin/pwd)`; \
66 cd $(G4TMPDIR); \
67 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o
68 endef
69 define build-global-shared-lib
70 @libdir=`(cd $(@D);/bin/pwd)`; \
71 cd $(G4TMP)/$(G4SYSTEM); \
72 $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \
73 $(foreach dir,$(SUBLIBS),$(dir)/*.o);
74 endef
75
76endif
77
Note: See TracBrowser for help on using the repository browser.