[23] | 1 | package bhep |
---|
| 2 | version v1r4p2 |
---|
| 3 | |
---|
| 4 | #////////////////////////////////////////////////// |
---|
| 5 | # |
---|
| 6 | # This file assumes the following |
---|
| 7 | # directory structure : |
---|
| 8 | # bhep/<version>/cmt |
---|
| 9 | # bhep/<version>/source/base/... |
---|
| 10 | # bhep/<version>/source/util/... |
---|
| 11 | # and a : |
---|
| 12 | # bhep/<version>/bhep |
---|
| 13 | # with all .h having been copied from the source |
---|
| 14 | # directory with something like : |
---|
| 15 | # find ../source -name "*.h" -exec cp {} ../bhep/. {}; |
---|
| 16 | # A copy of the config.h put under ../bhep. |
---|
| 17 | # |
---|
| 18 | #////////////////////////////////////////////////// |
---|
| 19 | |
---|
| 20 | #////////////////////////////////////////////////// |
---|
| 21 | use zlib v1r* Interfaces |
---|
| 22 | use HDF5 v1r* Interfaces |
---|
| 23 | use CLHEP v1r* Interfaces |
---|
| 24 | #////////////////////////////////////////////////// |
---|
| 25 | |
---|
| 26 | build_strategy no_prototypes |
---|
| 27 | include_path none |
---|
| 28 | |
---|
| 29 | include_dirs $(BHEPROOT) $(BHEPROOT)/bhep |
---|
| 30 | |
---|
| 31 | #////////////////////////////////////////////////// |
---|
| 32 | # No dependency over other libs. |
---|
| 33 | |
---|
| 34 | library bhep -import=CLHEP -import=HDF5\ |
---|
| 35 | -s=../source \ |
---|
| 36 | version.cpp \ |
---|
| 37 | base/event.cpp \ |
---|
| 38 | base/hit.cpp \ |
---|
| 39 | base/mparticle.cpp \ |
---|
| 40 | base/particle.cpp \ |
---|
| 41 | base/sparticle.cpp \ |
---|
| 42 | base/track.cpp \ |
---|
| 43 | util/material.cpp \ |
---|
| 44 | util/particle_definition.cpp \ |
---|
| 45 | util/ray.cpp \ |
---|
| 46 | converters/event_cvt.cpp \ |
---|
| 47 | converters/hit_cvt.cpp \ |
---|
| 48 | converters/mparticle_cvt.cpp \ |
---|
| 49 | converters/particle_cvt.cpp \ |
---|
| 50 | converters/sparticle_cvt.cpp \ |
---|
| 51 | converters/track_cvt.cpp \ |
---|
| 52 | manager/base_reader.cpp \ |
---|
| 53 | manager/bhep_svc.cpp \ |
---|
| 54 | manager/brw.cpp \ |
---|
| 55 | manager/converter_svc.cpp \ |
---|
| 56 | manager/random_reader.cpp \ |
---|
| 57 | manager/random_writer.cpp \ |
---|
| 58 | manager/reader_gz.cpp \ |
---|
| 59 | manager/reader_hdf5.cpp \ |
---|
| 60 | manager/reader_txt.cpp \ |
---|
| 61 | manager/sequential_reader.cpp \ |
---|
| 62 | manager/sequential_writer.cpp \ |
---|
| 63 | manager/writer_gz.cpp \ |
---|
| 64 | manager/writer_hdf5.cpp \ |
---|
| 65 | manager/writer_txt.cpp \ |
---|
| 66 | examples/generate_event.cpp \ |
---|
| 67 | tutorials/gevent.cpp \ |
---|
| 68 | histos/axis.cpp \ |
---|
| 69 | histos/histogram.cpp \ |
---|
| 70 | tools/EventManager.cpp |
---|
| 71 | |
---|
| 72 | macro bhep_cppflags "" |
---|
| 73 | macro bhep_shlibflags "${dld_linkopts} ${CLHEP_linkopts} ${HDF5_linkopts} ${zlib_linkopts}" |
---|
| 74 | macro bhep_linkopts "-L${BHEPROOT}/$(CMTCONFIG) -lbhep" |
---|
| 75 | |
---|
| 76 | #////////////////////////////////////////////////// |
---|
| 77 | #/// compile, link flags ////////////////////////// |
---|
| 78 | #////////////////////////////////////////////////// |
---|
| 79 | private |
---|
| 80 | # WIN32 : /GR to enable RTTI and dynamic cast. |
---|
| 81 | # WIN32 : /GX to enable exception handling (for STL). |
---|
| 82 | macro_append cppflags "" WIN32 " /GX /GR" |
---|
| 83 | |
---|
| 84 | # DEBUG : |
---|
| 85 | #macro_append cflags " -g" WIN32 " /ZI /Od" |
---|
| 86 | #macro_append cppflags " -g" WIN32 " /ZI /Od" |
---|
| 87 | #macro_append cpplinkflags " -g" WIN32 " /DEBUG /VERBOSE:LIB" |
---|
| 88 | |
---|
| 89 | # OPTIMIZE : |
---|
| 90 | macro_append cflags " -O" WIN32 " /O2" |
---|
| 91 | macro_append cppflags " -O" WIN32 " /O2" |
---|
| 92 | macro_append cpplinkflags " -O" WIN32 "" |
---|
| 93 | |
---|
| 94 | macro build_library_links "true" WIN32 "" |
---|
| 95 | macro remove_library_links "true" WIN32 "" |
---|
| 96 | public |
---|
| 97 | |
---|
| 98 | #////////////////////////////////////////////////// |
---|
| 99 | #/// Run time ///////////////////////////////////// |
---|
| 100 | #////////////////////////////////////////////////// |
---|
| 101 | |
---|
| 102 | pattern setup_paths \ |
---|
| 103 | path_remove LD_LIBRARY_PATH "${<PACKAGE>ROOT}/$(CMTCONFIG)" WIN32 "" Darwin "" ;\ |
---|
| 104 | path_append LD_LIBRARY_PATH "${<PACKAGE>ROOT}/$(CMTCONFIG)" WIN32 "" Darwin "" ;\ |
---|
| 105 | path_remove DYLD_LIBRARY_PATH "" Darwin "${<PACKAGE>ROOT}/$(CMTCONFIG)" ;\ |
---|
| 106 | path_append DYLD_LIBRARY_PATH "" Darwin "${<PACKAGE>ROOT}/$(CMTCONFIG)" ;\ |
---|
| 107 | path_remove PATH "${<PACKAGE>ROOT}/$(CMTCONFIG)" WIN32 "${<PACKAGE>ROOT}\$(CMTCONFIG)" ;\ |
---|
| 108 | path_append PATH "${<PACKAGE>ROOT}/$(CMTCONFIG)" WIN32 "${<PACKAGE>ROOT}\$(CMTCONFIG)" |
---|
| 109 | |
---|
| 110 | apply_pattern setup_paths |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | |
---|