| [282] | 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 | g4lab_cppflags=-I../source $(g4_incs) `onx-config --cppflags`
|
|---|
| 31 | g4lab_libs=-L. -lG4LabUIOnX -lG4LabCore $(g4_libs) `onx-config --core_libs`
|
|---|
| 32 |
|
|---|
| 33 | bin=.
|
|---|
| 34 | src=../source
|
|---|
| 35 | apps=../applications
|
|---|
| 36 |
|
|---|
| 37 | #///////////////////////////////////////////////////
|
|---|
| 38 | #// Platform ///////////////////////////////////////
|
|---|
| 39 | #///////////////////////////////////////////////////
|
|---|
| 40 | platform=$(shell uname)
|
|---|
| 41 | ifeq ($(platform),Darwin)
|
|---|
| 42 | compiler=eval c++
|
|---|
| 43 | linker=eval c++
|
|---|
| 44 | app_linker=eval c++ -bind_at_load
|
|---|
| 45 | shlib_builder=eval c++ -dynamiclib -twolevel_namespace -undefined dynamic_lookup -dynamic -single_module
|
|---|
| 46 | dll_builder=eval c++ -bundle -twolevel_namespace -Wl,-headerpad_max_install_names -Wl,-headerpad,800
|
|---|
| 47 | shlib_suffix=dylib
|
|---|
| 48 | dll_suffix=bundle
|
|---|
| 49 | dll_prefix=
|
|---|
| 50 | endif
|
|---|
| 51 |
|
|---|
| 52 | ifeq ($(platform),Linux)
|
|---|
| 53 | compiler=eval c++
|
|---|
| 54 | linker=eval c++
|
|---|
| 55 | app_linker=eval c++
|
|---|
| 56 | shlib_builder=eval c++ -shared
|
|---|
| 57 | dll_builder=eval c++ -shared
|
|---|
| 58 | shlib_suffix=so
|
|---|
| 59 | dll_suffix=so
|
|---|
| 60 | dll_prefix=lib
|
|---|
| 61 | endif
|
|---|
| 62 |
|
|---|
| 63 | #///////////////////////////////////////////////////////////////////////////
|
|---|
| 64 | all :: $(bin)/snovis_program
|
|---|
| 65 | @echo "snovis : all ok."
|
|---|
| 66 |
|
|---|
| 67 | #///////////////////////////////////////////////////////////////////////////
|
|---|
| 68 | clean ::
|
|---|
| [286] | 69 | /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
|
|---|
| [282] | 70 |
|
|---|
| 71 | include G4Lab.gmk
|
|---|
| 72 |
|
|---|
| 73 | #///////////////////////////////////////////////////////////////////////////
|
|---|
| 74 | # dll snovis :
|
|---|
| 75 | #///////////////////////////////////////////////////////////////////////////
|
|---|
| 76 |
|
|---|
| 77 | snovis_src = \
|
|---|
| 78 | $(src)/Callbacks.cxx \
|
|---|
| 79 | $(src)/InventorCallbacks.cxx \
|
|---|
| 80 | $(src)/Layouts.cxx
|
|---|
| 81 | snovis_objs = $(patsubst $(src)/%.cxx,$(bin)/%.o,$(snovis_src))
|
|---|
| 82 |
|
|---|
| 83 | snovis_cppflags=-I.. $(g4lab_cppflags) `onx-config --iv_cppflags` `aida-config --cppflags`
|
|---|
| 84 |
|
|---|
| 85 | snovis_linkopts=$(g4lab_libs) `onx-config --iv_libs`
|
|---|
| 86 |
|
|---|
| 87 | $(bin)/$(dll_prefix)snovis.$(dll_suffix) : $(snovis_objs)
|
|---|
| 88 | $(dll_builder) -o $(bin)/$(dll_prefix)snovis.$(dll_suffix) $(snovis_objs) $(snovis_linkopts)
|
|---|
| 89 |
|
|---|
| 90 | $(snovis_objs) : $(bin)/%.o : $(src)/%.cxx
|
|---|
| 91 | $(compiler) -c -o $@ $(snovis_cppflags) $<
|
|---|
| 92 |
|
|---|
| 93 | #///////////////////////////////////////////////////////////////////////////
|
|---|
| 94 | # application snovis_program :
|
|---|
| 95 | #///////////////////////////////////////////////////////////////////////////
|
|---|
| 96 |
|
|---|
| 97 | snovis_program_src = \
|
|---|
| 98 | $(apps)/snovis_main.cxx
|
|---|
| 99 | snovis_program_objs = $(patsubst $(apps)/%.cxx,$(bin)/%.o,$(snovis_program_src))
|
|---|
| 100 |
|
|---|
| 101 | 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
|
|---|
| 102 |
|
|---|
| 103 | 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
|
|---|
| 104 |
|
|---|
| 105 | $(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)
|
|---|
| 106 | $(app_linker) -o $(bin)/snovis_program $(snovis_program_objs) $(snovis_program_linkopts)
|
|---|
| 107 |
|
|---|
| 108 | $(snovis_program_objs) : $(bin)/%.o : $(apps)/%.cxx
|
|---|
| 109 | $(compiler) -c -o $@ $(snovis_program_cppflags) $<
|
|---|