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