source: trunk/geant4/config/sys/WIN32-VC.gmk @ 613

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

Compile, mais ce qui est dedans peut etre plus propre

File size: 6.0 KB
Line 
1#
2# ------ WIN32/VC ------    Visual-C++ 7 .NET and higher
3#
4ifeq ($(G4SYSTEM),WIN32-VC)
5  CXX       := CL
6  ifdef G4OPTIMISE
7    CXXFLAGS  += -Ox
8  else
9    ifdef G4DEBUG
10      CXXFLAGS  += -Od -Zi -Fd$(G4LIBDIR)/lib$(name)
11    endif
12  endif
13  CXXFLAGS += -MD -GR -EHsc -Zm200 -nologo
14  CXXFLAGS += -D_CONSOLE -D_WIN32 -DOS
15  CPPFLAGS += -DWIN32 -DXPNET -D_CRT_SECURE_NO_DEPRECATE
16  LDFLAGS  += -FORCE /NODEFAULTLIB:MSVCRT.dll
17
18  SHEXT := dll
19  AR := LIB
20  ECHO := /usr/bin/echo -e
21  GREP := /usr/bin/grep
22  SED  := /usr/bin/sed
23  CAT  := /usr/bin/cat
24  CUT  := /usr/bin/cut
25
26  FC := g77
27#  FCLIBS := -lf2c
28  ifndef OGLFLAGS
29    OGLFLAGS  :=
30  endif
31  ifndef OGLLIBS
32    OGLLIBS   := glu32.lib opengl32.lib
33  endif
34  ifndef UI32LIBS
35    UI32LIBS  := gdi32.lib user32.lib
36  endif
37  ifndef QTHOME
38    QTHOME  := /usr
39  endif
40  ifndef QTFLAGS
41    QTFLAGS   := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
42    MOC       := $(QTHOME)/bin/moc
43  endif
44  ifndef QTLIBS
45    QT3LIBS    := -L$(QTHOME)/lib -lqt-mt
46    QT4LIBS    := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtSql4.lib QtXml4.lib
47    QT4LIBS    += -lG4baryons -lG4biasing -lG4bosons -lG4brep -lG4csg -lG4cuts -lG4decay -lG4detector -lG4detutils -lG4digits -lG4emhighenergy -lG4emlowenergy -lG4empolar -lG4emstandard -lG4emutils -lG4error_propagation -lG4event -lG4geombias -lG4geomBoolean -lG4geomdivision -lG4geometrymng -lG4gflash -lG4globman -lG4graphics_reps -lG4hadronic_ablation -lG4hadronic_abrasion -lG4hadronic_bert_cascade -lG4hadronic_binary -lG4hadronic_body_ci -lG4hadronic_coherent_elastic -lG4hadronic_deex_evaporation -lG4hadronic_deex_fermi_breakup -lG4hadronic_deex_fission -lG4hadronic_deex_gem_evaporation -lG4hadronic_deex_handler -lG4hadronic_deex_management -lG4hadronic_deex_multifragmentation -lG4hadronic_deex_photon_evaporation -lG4hadronic_deex_util -lG4hadronic_em_dissociation -lG4hadronic_HE -lG4hadronic_hetcpp_evaporation -lG4hadronic_hetcpp_utils -lG4hadronic_interface_ci -lG4hadronic_iso -lG4hadronic_LE -lG4hadronic_leading_particle -lG4hadronic_mgt -lG4hadronic_proc -lG4hadronic_qgstring -lG4hadronic_radioactivedecay -lG4hadronic_stop -lG4hadronic_util -lG4hadronic_xsect -lG4had_im_r_matrix -lG4had_lll_fis -lG4had_mod_man -lG4had_mod_util -lG4had_muon_nuclear -lG4had_neu_hp -lG4had_preequ_exciton -lG4had_string_diff -lG4had_string_frag -lG4had_string_man -lG4had_theo_max -lG4hepnumerics -lG4hits -lG4intercoms -lG4ions -lG4leptons -lG4magneticfield -lG4materials -lG4mesons -lG4modeling -lG4muons -lG4navigation -lG4OpenGL -lG4optical -lG4parameterisation -lG4partman -lG4partutils -lG4persistency -lG4phys_builders -lG4phys_lists -lG4procman -lG4RayTracer -lG4readout -lG4run -lG4scoring -lG4shortlived -lG4specsolids -lG4track -lG4tracking -lG4transportation -lG4Tree -lG4UIbasic -lG4UIcommon -lG4UIGAG -lG4visHepRep -lG4visXXX -lG4vis_management -lG4volumes -lG4VRML -lG4xrays
48
49    QTLIBS     := $(shell test -f $(QTHOME)/lib/Qt3Support4.lib && echo $(QT4LIBS) || echo $(QT3LIBS))
50  endif
51
52#
53# Building DLLs (G.Barrand)
54# -------------
55#  The commands below allow to build DLLs from the archive libraries.
56#  From a libG4xxx.a, it will extract the symbols with :
57#    DOS> dumpbin /symbols libG4xxx.a > G4xxx.dumpbin
58#  After that it will produce a G4xxx.def using the 'win32def' program.
59#  The G4xxx.def file will contain the list of symbols that are "exported"
60#  or made public for using the DLLs.
61#  The source win32def.c is in the geant4/config directory. The binary is
62#  built during the library installation process, and will be placed in
63#  $G4LIB/G4SYSTEM.
64#  If can also be built as follows :
65#    DOS> cl.exe /Fowin32def.exe win32def.c
66#  Then, to use it :
67#    DOS> win32def G4xxx < G4xxx.dumpbin > G4xxx.def
68#  Libraries libG4xxx.lib can also be built with :
69#    DOS> lib /def:G4xxx.def /out:libG4xxx.lib
70#  It also produces a libG4xxx.exp used to build the DLL.
71#  The DLL can be built with :
72#    DOS> link /dll /out:G4xxx.dll libG4xxx.exp libG4xxx.a <dependencies>
73#  Note that a DLL must be fully linked. You should NOT have undefined
74#  symbols as output of the link command.
75#
76  define build-granular-shared-lib
77    @libdir=`(cd $(@D);/bin/pwd)`;\
78    cd $(G4TMP)/$(G4SYSTEM);\
79    $(ECHO) "Building $(name).dumpbin file ...";\
80    $(RM) $(name).dumpbin;\
81    dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
82    $(ECHO) "Building $(name).def file ...";\
83    $(RM) $(name).def;\
84    $(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
85    $(RM) $(name).dumpbin;\
86    $(ECHO) "Building lib$(name).exp and lib$(name).lib file ...";\
87    $(RM) $(G4LIBDIR)/lib$(name).exp;\
88    $(RM) $(G4LIBDIR)/lib$(name).lib;\
89    lib.exe /nologo /machine:ix86 /def:$(name).def \
90            /out:$(G4LIBDIR)/lib$(name).lib;\
91    $(RM) $(G4LIBDIR)/$(name).dll;\
92    $(ECHO) "Building $(name).dll file ...";\
93    link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
94             $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
95             /libpath:$(G4LIBDIR) $(GLOBLIBS) \
96             $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
97             $(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
98  endef
99  define build-global-shared-lib
100    @libdir=`(cd $(@D);/bin/pwd)`;\
101    cd $(G4TMP)/$(G4SYSTEM);\
102    $(ECHO) "Building $(name).dumpbin file ...";\
103    $(RM) $(name).dumpbin;\
104    dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
105    $(ECHO) "Building $(name).def file ...";\
106    $(RM) $(name).def;\
107    $(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
108    $(RM) $(name).dumpbin;\
109    $(ECHO) "Building lib$(name).exp and lib$(name).lib ...";\
110    $(RM) $(G4LIBDIR)/lib$(name).exp;\
111    $(RM) $(G4LIBDIR)/lib$(name).lib;\
112    lib.exe /nologo /machine:ix86 /def:$(name).def \
113            /out:$(G4LIBDIR)/lib$(name).lib;\
114    $(RM) $(G4LIBDIR)/$(name).dll;\
115    $(ECHO) "Building $(name).dll ...";\
116    link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
117             $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
118             /libpath:$(G4LIBDIR) $(GLOBLIBS) \
119             $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
120             $(INTYLIBS) $(ANALYSISLIBS) $(UI32LIBS)
121  endef
122endif
Note: See TracBrowser for help on using the repository browser.