[472] | 1 | # |
---|
[483] | 2 | # ------ GNU/WIN32 CYGWIN ------ !!! not supported !!! |
---|
[472] | 3 | # Cygnus CygWin - gcc-3.2 and higher |
---|
[483] | 4 | # Windows XP |
---|
[472] | 5 | # |
---|
| 6 | # Stefano Agostinelli (agos001@pn.itnet.it) - IST Group, Genova |
---|
| 7 | # |
---|
| 8 | ifeq ($(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 |
---|
[1185] | 23 | ifdef G4PROFILE |
---|
| 24 | CXXFLAGS += -pg |
---|
| 25 | FCFLAGS += -pg |
---|
| 26 | CCFLAGS += -pg |
---|
| 27 | endif |
---|
| 28 | ifdef G4OPTDEBUG |
---|
| 29 | CXXFLAGS += -O2 -g |
---|
| 30 | FCFLAGS += -O2 -g |
---|
| 31 | CCFLAGS += -O2 -g |
---|
| 32 | endif |
---|
[472] | 33 | ifdef G4LIB_BUILD_SHARED |
---|
| 34 | CXXFLAGS += -fPIC |
---|
| 35 | FCFLAGS += -fPIC |
---|
| 36 | CCFLAGS += -fPIC |
---|
| 37 | endif |
---|
[483] | 38 | |
---|
[472] | 39 | G4RUNPATHOPTION := -Wl,-rpath |
---|
[483] | 40 | SHEXT := so |
---|
| 41 | ECHO := echo -e |
---|
| 42 | GREP := /usr/bin/grep |
---|
| 43 | SED := /usr/bin/sed |
---|
| 44 | CAT := /usr/bin/cat |
---|
| 45 | CUT := /usr/bin/cut |
---|
| 46 | |
---|
[472] | 47 | FC := g77 |
---|
| 48 | FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore |
---|
| 49 | FCLIBS := -lg2c -lnsl |
---|
| 50 | ifndef X11FLAGS |
---|
| 51 | X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11 |
---|
| 52 | endif |
---|
| 53 | ifndef X11LIBS |
---|
[1017] | 54 | X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE |
---|
[472] | 55 | endif |
---|
| 56 | ifndef XMFLAGS |
---|
| 57 | XMFLAGS := -I/usr/X11R6/include |
---|
| 58 | endif |
---|
| 59 | ifndef XMLIBS |
---|
| 60 | XMLIBS := -lXm -lXpm |
---|
| 61 | endif |
---|
| 62 | ifndef XAWFLAGS |
---|
| 63 | XAWFLAGS := -I/usr/X11R6/include |
---|
| 64 | endif |
---|
| 65 | ifndef XAWLIBS |
---|
| 66 | XAWLIBS := -lXaw |
---|
| 67 | endif |
---|
| 68 | ifndef OGLFLAGS |
---|
| 69 | OGLFLAGS := -I$(OGLHOME)/include |
---|
| 70 | endif |
---|
| 71 | ifndef OGLLIBS |
---|
| 72 | OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL |
---|
| 73 | endif |
---|
| 74 | define build-granular-shared-lib |
---|
| 75 | @libdir=`(cd $(@D);/bin/pwd)`; \ |
---|
| 76 | cd $(G4TMPDIR); \ |
---|
| 77 | $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) *.o |
---|
| 78 | endef |
---|
| 79 | define build-global-shared-lib |
---|
| 80 | @libdir=`(cd $(@D);/bin/pwd)`; \ |
---|
| 81 | cd $(G4TMP)/$(G4SYSTEM); \ |
---|
| 82 | $(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) $(INTYLIBS) \ |
---|
| 83 | $(foreach dir,$(SUBLIBS),$(dir)/*.o); |
---|
| 84 | endef |
---|
| 85 | |
---|
| 86 | endif |
---|
| 87 | |
---|