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

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

ameliorations pour les MOC

File size: 6.1 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  endif
43  ifndef QTMOC
44    QTMOC       := $(QTHOME)/bin/moc
45  endif
46  ifndef QTLIBS
47    QT3LIBS    := -L$(QTHOME)/lib -lqt-mt
48    QT4LIBS    := -L$(QTHOME)/lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtSql4.lib QtXml4.lib
49    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
50    QTLIBS     := $(shell test -f $(QTHOME)/lib/Qt3Support4.lib && echo $(QT4LIBS) || echo $(QT3LIBS))
51  endif
52
53
54#
55# Building DLLs (G.Barrand)
56# -------------
57#  The commands below allow to build DLLs from the archive libraries.
58#  From a libG4xxx.a, it will extract the symbols with :
59#    DOS> dumpbin /symbols libG4xxx.a > G4xxx.dumpbin
60#  After that it will produce a G4xxx.def using the 'win32def' program.
61#  The G4xxx.def file will contain the list of symbols that are "exported"
62#  or made public for using the DLLs.
63#  The source win32def.c is in the geant4/config directory. The binary is
64#  built during the library installation process, and will be placed in
65#  $G4LIB/G4SYSTEM.
66#  If can also be built as follows :
67#    DOS> cl.exe /Fowin32def.exe win32def.c
68#  Then, to use it :
69#    DOS> win32def G4xxx < G4xxx.dumpbin > G4xxx.def
70#  Libraries libG4xxx.lib can also be built with :
71#    DOS> lib /def:G4xxx.def /out:libG4xxx.lib
72#  It also produces a libG4xxx.exp used to build the DLL.
73#  The DLL can be built with :
74#    DOS> link /dll /out:G4xxx.dll libG4xxx.exp libG4xxx.a <dependencies>
75#  Note that a DLL must be fully linked. You should NOT have undefined
76#  symbols as output of the link command.
77#
78  define build-granular-shared-lib
79    @libdir=`(cd $(@D);/bin/pwd)`;\
80    cd $(G4TMP)/$(G4SYSTEM);\
81    $(ECHO) "Building $(name).dumpbin file ...";\
82    $(RM) $(name).dumpbin;\
83    dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
84    $(ECHO) "Building $(name).def file ...";\
85    $(RM) $(name).def;\
86    $(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
87    $(RM) $(name).dumpbin;\
88    $(ECHO) "Building lib$(name).exp and lib$(name).lib file ...";\
89    $(RM) $(G4LIBDIR)/lib$(name).exp;\
90    $(RM) $(G4LIBDIR)/lib$(name).lib;\
91    lib.exe /nologo /machine:ix86 /def:$(name).def \
92            /out:$(G4LIBDIR)/lib$(name).lib;\
93    $(RM) $(G4LIBDIR)/$(name).dll;\
94    $(ECHO) "Building $(name).dll file ...";\
95    link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
96             $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
97             /libpath:$(G4LIBDIR) $(GLOBLIBS) \
98             $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
99             $(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS)
100  endef
101  define build-global-shared-lib
102    @libdir=`(cd $(@D);/bin/pwd)`;\
103    cd $(G4TMP)/$(G4SYSTEM);\
104    $(ECHO) "Building $(name).dumpbin file ...";\
105    $(RM) $(name).dumpbin;\
106    dumpbin /symbols $(G4LIBDIR)/lib$(name).a > $(name).dumpbin;\
107    $(ECHO) "Building $(name).def file ...";\
108    $(RM) $(name).def;\
109    $(G4LIB)/$(G4SYSTEM)/win32def.exe $(name) < $(name).dumpbin > $(name).def;\
110    $(RM) $(name).dumpbin;\
111    $(ECHO) "Building lib$(name).exp and lib$(name).lib ...";\
112    $(RM) $(G4LIBDIR)/lib$(name).exp;\
113    $(RM) $(G4LIBDIR)/lib$(name).lib;\
114    lib.exe /nologo /machine:ix86 /def:$(name).def \
115            /out:$(G4LIBDIR)/lib$(name).lib;\
116    $(RM) $(G4LIBDIR)/$(name).dll;\
117    $(ECHO) "Building $(name).dll ...";\
118    link.exe /nologo /dll /out:$(G4LIBDIR)/$(name).dll \
119             $(G4LIBDIR)/lib$(name).exp $(G4LIBDIR)/lib$(name).a \
120             /libpath:$(G4LIBDIR) $(GLOBLIBS) \
121             $(LIB_PATH)$(CLHEP_LIB_DIR) $(CLHEP_LIB) \
122             $(INTYLIBS) $(GDMLLIBS) $(ANALYSISLIBS) $(UI32LIBS)
123  endef
124endif
Note: See TracBrowser for help on using the repository browser.