source: snovis/trunk/cmt/requirements @ 103

Last change on this file since 103 was 103, checked in by barrand, 17 years ago
File size: 6.3 KB
Line 
1package MEMPHYS
2version v7r0
3
4#//////////////////////////////////////////////////
5#/// Uses needed to build this package ////////////
6#//////////////////////////////////////////////////
7
8use OpenScientist v16r0 Interfaces
9
10#use Geant4 v2r* Interfaces
11
12set G4RADIOACTIVEDATA "${OSC_G4RADIOACTIVEDATA}"
13set G4LEVELGAMMADATA "${OSC_G4LEVELGAMMADATA}"
14set G4LEDATA "${OSC_G4LEDATA}"
15set NeutronHPCrossSections "${OSC_NeutronHPCrossSections}"
16
17#////////////////////////////////////////////////////////////
18#/// From Interfaces/Platform ///////////////////////////////
19#////////////////////////////////////////////////////////////
20
21macro Platform_bin "${CMTCONFIG}"
22#set PLATFORMBIN "${Platform_bin}"
23
24pattern Platform_paths \
25  path_remove LD_LIBRARY_PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "" Darwin "" ;\
26  path_append LD_LIBRARY_PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "" Darwin "" ;\
27  path_remove DYLD_LIBRARY_PATH "" Darwin "$(<PACKAGE>ROOT)/$(Platform_bin)" ;\
28  path_append DYLD_LIBRARY_PATH "" Darwin "$(<PACKAGE>ROOT)/$(Platform_bin)" ;\
29  path_remove PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "$(<PACKAGE>ROOT)\$(Platform_bin)" ;\
30  path_append PATH "$(<PACKAGE>ROOT)/$(Platform_bin)" WIN32 "$(<PACKAGE>ROOT)\$(Platform_bin)"
31
32# Darwin : to build dlls properly :
33macro make_shlib "$(make_shlib)" Darwin "$(MEMPHYSROOT)/cmt/cmt_make_shlib_common.sh extract"
34
35#//////////////////////////////////////////////////
36#//////////////////////////////////////////////////
37#//////////////////////////////////////////////////
38
39branches run
40
41build_strategy no_prototypes
42include_path none
43
44include_dirs $(MEMPHYSROOT)
45
46# With Geant4 global libs :
47macro MEMPHYS_Geant4_incs "${OSC_Geant4_incs}"
48macro MEMPHYS_Geant4_linkopts "-L${OSC_Geant4_lib} -lG4physicslists -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global -lCLHEP"
49
50# Waiting Geant4 DLL on Windows...
51# Darwin : problem too with dylibs.
52macro MEMPHYS_libopts "" WIN32 " -no_share" Darwin " -no_share"
53#macro MEMPHYS_libopts "" WIN32 ""
54
55#//////////////////////////////////////////////////
56#/// Over Geant4 kernel and AIDA interfaces only //
57#//////////////////////////////////////////////////
58
59# Over Geant4 and AIDA only :
60library MEMPHYSCore ${MEMPHYS_libopts} -s=../source *.cxx
61
62#JEC 17/11/05 add the G4readout_incs to manage G4DigiManager
63macro MEMPHYSCore_cppflags "${OSC_AIDA_incs} ${MEMPHYS_Geant4_incs}"
64#macro MEMPHYSCore_shlibflags "${MEMPHYS_Geant4_linkopts}"
65macro MEMPHYSCore_linkopts "-L${MEMPHYSROOT}/$(Platform_bin) -lMEMPHYSCore" WIN32 "${MEMPHYSROOT}\$(Platform_bin)\MEMPHYSCore.lib"
66
67#//////////////////////////////////////////////////
68#/// DLD callbacks ////////////////////////////////
69#//////////////////////////////////////////////////
70
71# Must not use Geant4 singletons if having not Geant4 shared libs.
72macro MEMPHYS_kind "dll"
73library MEMPHYS -s=../source/Callbacks Callbacks.cxx InventorCallbacks.cxx
74#macro MEMPHYS_cppflags "${MEMPHYS_Geant4_incs} ${OSC_OnX_incs}"
75macro MEMPHYS_cppflags "${OSC_G4Lab_incs} ${OSC_AIDA_incs} ${OSC_OnX_incs} ${OSC_Inventor_incs}"
76macro MEMPHYS_shlibflags "${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"
77
78#//////////////////////////////////////////////////
79#/// Application "a la Geant4 examples" ///////////
80#//////////////////////////////////////////////////
81
82# Over Geant4 and AIDA only :
83application MEMPHYS_batch ../applications/MEMPHYS_batch.cxx use_linkopts='"${MEMPHYSCore_linkopts} ${MEMPHYS_Geant4_linkopts} ${OSC_AIDA_linkopts}"'
84#macro MEMPHYS_batch_cppflags "${MEMPHYSCore_cppflags} "
85macro MEMPHYS_batch_cppflags "${MEMPHYSCore_cppflags}"
86
87# Over AIDA only :
88application MEMPHYS_analysis ../applications/MEMPHYS_analysis.cxx use_linkopts='"$(OSC_AIDA_linkopts)"'
89
90# Over G4Lab :
91application MEMPHYS_session ../applications/MEMPHYS_session.cxx ../applications/HitsCollectionAccessor.cxx use_linkopts='"${MEMPHYSCore_linkopts} ${OSC_G4Lab_linkopts} ${MEMPHYS_Geant4_linkopts} ${OSC_Inventor_linkopts} ${OSC_OnX_linkopts}"'
92macro MEMPHYS_session_cppflags "${MEMPHYS_Geant4_incs} ${MEMPHYS_batch_cppflags}"
93
94application test -group=debug -s=../source test.cxx
95
96#//////////////////////////////////////////////////
97#/// Things using ROOT ////////////////////////////
98#//////////////////////////////////////////////////
99use ROOT v1r* Interfaces
100
101# Example of ROOT program to work on a MEMPHYS.root file :
102application MEMPHYS_analysis_ROOT -group=ROOT ../applications/MEMPHYS_analysis_ROOT.cxx use_linkopts='"${ROOT_Gpad_linkopts} ${ROOT_freetype_linkopts} ${ROOT_Graf_linkopts} ${ROOT_Tree_linkopts} ${ROOT_Hist_linkopts} ${ROOT_Matrix_linkopts} ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}"'
103
104# Compiled version of scripts/ROOT/aida.C
105application MEMPHYS_analysis_aida_ROOT -group=ROOT ../applications/MEMPHYS_analysis_aida_ROOT.cxx use_linkopts='"${OSC_AIDA_linkopts} ${ROOT_Gpad_linkopts} ${ROOT_freetype_linkopts} ${ROOT_Graf_linkopts} ${ROOT_Hist_linkopts} ${ROOT_Matrix_linkopts} ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}"'
106macro MEMPHYS_analysis_aida_ROOT_cppflags "${OSC_AIDA_incs}"
107
108# Declare AIDA to rootcint.
109# See scripts/ROOT/aida.C for a usage example.
110
111macro MEMPHYS_cint_cintflags "${OSC_AIDA_incs}"
112macro MEMPHYS_cint_LinkDef_h "../source/ROOT/LinkDef.h"
113document rootcint MEMPHYS_rootcint_AIDA -group=ROOT ${MEMPHYSROOT}/source/ROOT/MEMPHYS_cint.h
114
115library MEMPHYSAIDADict -group=ROOT -import=ROOT ${dict}/MEMPHYS_cintDict.cpp
116macro MEMPHYSAIDADict_shlibflags "$(OSC_AIDA_linkopts) ${ROOT_Core_linkopts} ${ROOT_Cint_linkopts}"
117
118#//////////////////////////////////////////////////
119#//////////////////////////////////////////////////
120#//////////////////////////////////////////////////
121
122private
123macro build_library_links "true" WIN32 ""
124macro remove_library_links "true" WIN32 ""
125
126# WIN32 : /GR to enable RTTI and dynamic cast.
127# WIN32 : /GX to enable exception handling (for STL).
128macro_append cppflags "" WIN32 " /GX /GR"
129
130# DEBUG :
131#macro_append cflags  " -g" WIN32 " /ZI /Od"
132#macro_append cppflags  " -g" WIN32 " /ZI /Od"
133#macro_append cpplinkflags  " -g" WIN32 " /DEBUG"
134
135# OPTIMIZE :
136macro_append cflags  " -O" WIN32 " /O2"
137macro_append cppflags  " -O" WIN32 " /O2"
138macro_append cpplinkflags  " -O" WIN32 ""
139public
140
141#//////////////////////////////////////////////////
142#// Run time //////////////////////////////////////
143#//////////////////////////////////////////////////
144
145apply_pattern Platform_paths
146
Note: See TracBrowser for help on using the repository browser.