1 | |
---|
2 | #/////////////////////////////////////////////////// |
---|
3 | #// If working with a osc_vis kit, customize the |
---|
4 | #// two below lines in order to find CLHEP and |
---|
5 | #// Geant4 on your machine. It is assumed that |
---|
6 | #// CLHEP installation is of the form : |
---|
7 | #// ${CLHEP_home}/include |
---|
8 | #// ${CLHEP_home}/lib/libCLHEP-<version>.[dylib,so] |
---|
9 | #// and Geant4 : |
---|
10 | #// ${g4_home}/include |
---|
11 | #// ${g4_home}/lib/libG4global.[dylib,so], etc.. |
---|
12 | #// It is assumed that the G4 global libs are |
---|
13 | #// available. |
---|
14 | #/////////////////////////////////////////////////// |
---|
15 | CLHEP_home=/usr/local/CLHEP/2.0.3.1 |
---|
16 | g4_home=/usr/local/geant4/8.2 |
---|
17 | |
---|
18 | HDF5_home=/usr/local/HDF5/1.6.5 |
---|
19 | |
---|
20 | # SNEMO : |
---|
21 | bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2 |
---|
22 | snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0 |
---|
23 | |
---|
24 | #/////////////////////////////////////////////////// |
---|
25 | #/////////////////////////////////////////////////// |
---|
26 | #/////////////////////////////////////////////////// |
---|
27 | g4_incs=-I$(CLHEP_home)/include -I$(g4_home)/include |
---|
28 | g4_libs=-L$(g4_home)/lib -lG4readout -lG4run -lG4event -lG4tracking -lG4processes -lG4digits_hits -lG4track -lG4particles -lG4geometry -lG4graphics_reps -lG4materials -lG4intercoms -lG4global -L$(CLHEP_home)/lib -lCLHEP-2.0.3.1 |
---|
29 | |
---|
30 | g4_vis_libs=-L$(g4_home)/lib -lG4interfaces -lG4Tree -lG4vis_management -lG4modeling |
---|
31 | |
---|
32 | g4lab_cppflags=-I../source $(g4_incs) `onx-config --cppflags` |
---|
33 | g4lab_libs=-L. -lG4LabUIOnX -lG4LabCore $(g4_libs) `onx-config --core_libs` |
---|
34 | |
---|
35 | bin=. |
---|
36 | src=../source |
---|
37 | apps=../applications |
---|
38 | |
---|
39 | #/////////////////////////////////////////////////// |
---|
40 | #// Platform /////////////////////////////////////// |
---|
41 | #/////////////////////////////////////////////////// |
---|
42 | platform=$(shell uname) |
---|
43 | ifeq ($(platform),Darwin) |
---|
44 | compiler=eval c++ |
---|
45 | linker=eval c++ |
---|
46 | app_linker=eval c++ -bind_at_load |
---|
47 | shlib_builder=eval c++ -dynamiclib -twolevel_namespace -undefined dynamic_lookup -dynamic -single_module |
---|
48 | dll_builder=eval c++ -bundle -twolevel_namespace -Wl,-headerpad_max_install_names -Wl,-headerpad,800 |
---|
49 | shlib_suffix=dylib |
---|
50 | dll_suffix=bundle |
---|
51 | dll_prefix= |
---|
52 | endif |
---|
53 | |
---|
54 | ifeq ($(platform),Linux) |
---|
55 | compiler=eval c++ |
---|
56 | linker=eval c++ |
---|
57 | app_linker=eval c++ |
---|
58 | shlib_builder=eval c++ -shared |
---|
59 | dll_builder=eval c++ -shared |
---|
60 | shlib_suffix=so |
---|
61 | dll_suffix=so |
---|
62 | dll_prefix=lib |
---|
63 | endif |
---|
64 | |
---|
65 | #/////////////////////////////////////////////////////////////////////////// |
---|
66 | all :: $(bin)/snovis_program $(bin)/snovis_snova |
---|
67 | @echo "snovis : all ok." |
---|
68 | |
---|
69 | #/////////////////////////////////////////////////////////////////////////// |
---|
70 | clean :: |
---|
71 | /bin/rm -f $(bin)/*.o;/bin/rm -f $(bin)/*.a;/bin/rm -f $(bin)/*.so;/bin/rm -f $(bin)/*.dylib;/bin/rm -f $(bin)/*.bundle;/bin/rm $(bin)/snovis_program $(bin)/snovis_snova |
---|
72 | |
---|
73 | include G4Lab.gmk |
---|
74 | |
---|
75 | #/////////////////////////////////////////////////////////////////////////// |
---|
76 | # dll snovis : |
---|
77 | #/////////////////////////////////////////////////////////////////////////// |
---|
78 | |
---|
79 | snovis_src = \ |
---|
80 | $(src)/Callbacks.cxx \ |
---|
81 | $(src)/InventorCallbacks.cxx \ |
---|
82 | $(src)/Layouts.cxx |
---|
83 | snovis_objs = $(patsubst $(src)/%.cxx,$(bin)/%.o,$(snovis_src)) |
---|
84 | |
---|
85 | snovis_cppflags=-I.. $(g4lab_cppflags) `onx-config --iv_cppflags` `aida-config --cppflags` |
---|
86 | |
---|
87 | snovis_linkopts=$(g4lab_libs) `onx-config --iv_libs` |
---|
88 | |
---|
89 | $(bin)/$(dll_prefix)snovis.$(dll_suffix) : $(snovis_objs) |
---|
90 | $(dll_builder) -o $(bin)/$(dll_prefix)snovis.$(dll_suffix) $(snovis_objs) $(snovis_linkopts) |
---|
91 | |
---|
92 | $(snovis_objs) : $(bin)/%.o : $(src)/%.cxx |
---|
93 | $(compiler) -c -o $@ $(snovis_cppflags) $< |
---|
94 | |
---|
95 | #/////////////////////////////////////////////////////////////////////////// |
---|
96 | # application snovis_program : |
---|
97 | #/////////////////////////////////////////////////////////////////////////// |
---|
98 | |
---|
99 | snovis_program_src = \ |
---|
100 | $(apps)/snovis_main.cxx |
---|
101 | snovis_program_objs = $(patsubst $(apps)/%.cxx,$(bin)/%.o,$(snovis_program_src)) |
---|
102 | |
---|
103 | snovis_program_cppflags=-I.. $(g4lab_cppflags) `aida-config --cppflags` -I$(HDF5_home)/include -I$(bhep_home) -I$(snova_home) -I$(snova_home)/source/SNvertex/include -I$(snova_home)/source/GeomUtils/include -I$(snova_home)/source/SNgeom2/include |
---|
104 | |
---|
105 | snovis_program_linkopts=-L$(snova_home)/bin_obuild -lsnova -lsngeom -lsnvertex -lgeomutils -L$(bhep_home)/bin_obuild -lbhep $(g4lab_libs) `onx-config --core_libs` `onx-config --iv_libs` -L${HDF5_home}/lib -lhdf5 |
---|
106 | |
---|
107 | $(bin)/snovis_program : $(bin)/libG4LabCore.$(shlib_suffix) $(bin)/libG4LabUIOnX.$(shlib_suffix) $(bin)/$(dll_prefix)G4Lab.$(dll_suffix) $(bin)/$(dll_prefix)snovis.$(dll_suffix) $(snovis_program_objs) |
---|
108 | $(app_linker) -o $(bin)/snovis_program $(snovis_program_objs) $(snovis_program_linkopts) |
---|
109 | |
---|
110 | $(snovis_program_objs) : $(bin)/%.o : $(apps)/%.cxx |
---|
111 | $(compiler) -c -o $@ $(snovis_program_cppflags) $< |
---|
112 | |
---|
113 | #/////////////////////////////////////////////////////////////////////////// |
---|
114 | # application snovis_snova : |
---|
115 | #/////////////////////////////////////////////////////////////////////////// |
---|
116 | |
---|
117 | snovis_snova_src = $(apps)/prog_snova2.cxx |
---|
118 | snovis_snova_objs = $(patsubst $(apps)/%.cxx,$(bin)/%.o,$(snovis_snova_src)) |
---|
119 | |
---|
120 | snovis_snova_cppflags=$(g4_incs) -I$(HDF5_home)/include -I$(bhep_home) -I$(snova_home) -I$(snova_home)/source/SNvertex/include -I$(snova_home)/source/GeomUtils/include -I$(snova_home)/source/SNgeom2/include |
---|
121 | |
---|
122 | snovis_snova_linkopts=-L$(snova_home)/bin_obuild -lsnova_ui -lsnova -lsngeom -lsnvertex -lgeomutils -L$(bhep_home)/bin_obuild -lbhep -L${HDF5_home}/lib -lhdf5 $(g4_vis_libs) $(g4_libs) -lz |
---|
123 | |
---|
124 | $(bin)/snovis_snova : $(snovis_snova_objs) |
---|
125 | $(app_linker) -o $(bin)/snovis_snova $(snovis_snova_objs) $(snovis_snova_linkopts) |
---|
126 | |
---|
127 | $(snovis_snova_objs) : $(bin)/%.o : $(apps)/%.cxx |
---|
128 | $(compiler) -c -o $@ $(snovis_snova_cppflags) $< |
---|
129 | |
---|