forked from JeffersonLab/libsbsdig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
132 lines (110 loc) · 3.83 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#------------------------------------------------------------------------------
include Makefile.arch
#------------------------------------------------------------------------------
NAME := libsbsdig
SOLINCLUDE := -I$(shell pwd)/src -I$(shell pwd)/libsbsgem
#------------------------------------------------------------------------------
# Hall A Analyzer
# Analyzer default location,
ANALYZER ?= $(HOME)/ANALYZER
# Possible Analyzer header locations, will be used in the order found
ANAINCDIRS := $(wildcard $(addprefix $(ANALYZER)/, include))
ifeq ($(strip $(ANAINCDIRS)),)
$(error No Analyzer header files found. Check $$ANALYZER)
endif
SBS ?= $(HOME)/SBS
SBSINCDIRS := $(wildcard $(addprefix $(SBS)/, include))
ifeq ($(strip $(SBSINCDIRS)),)
$(error No SBS-Offline header files found. Check $$SBS_)
endif
#------------------------------------------------------------------------------
# EVIO => comment evio stuff
#
# PLATFORM = $(shell uname -s)-$(shell uname -i)
# EVIO default locations as a last resort if $EVIO isn't set in build env
# EVIO ?= $(CODA)
# EVIO ?= ../libevio
# ifdef EVIO_INCDIR
# EVIOINC= $(EVIO_INCDIR)
# else
# # Possible EVIO header directories, will be used in the order found
# EVIOINC := $(wildcard $(addprefix $(EVIO)/, include src/libsrc src/libsrc++))
# endif
# ifdef EVIO_LIBDIR
# EVIOLIB= $(EVIO_LIBDIR)
# else
# # Possible EVIO library locations, the first one found will be used
# EVIOLIB := $(firstword $(wildcard $(addprefix $(EVIO)/, $(PLATFORM)/lib lib)))
# endif
# ifeq ($(strip $(EVIOINC)),)
# $(error No EVIO header files found. Check $$EVIO)
# endif
# ifeq ($(strip $(EVIOLIB)),)
# $(error No EVIO library directory found. Check $$EVIO)
# endif
# ifeq (debug,$(findstring debug,$(ROOTBUILD)))
# DBGSFX = -dbg
# CXXFLAGS += -O0
# else
# CXXFLAGS += -O2 -g #-DNDEBUG
# endif
# SOLINCLUDE += $(addprefix -I, $(EVIOINC) )
# LDFLAGS += -L$(EVIOLIB) -levioxx$(DBGSFX) -levio$(DBGSFX) -lz -lexpat
# Some of the analyzer include dirs conflict with headers in
# EVIO
SOLINCLUDE += $(addprefix -I, $(ANAINCDIRS) )
SOLINCLUDE += $(addprefix -I, $(SBSINCDIRS) )
#------------------------------------------------------------------------------
CXXFLAGS += $(SOLINCLUDE)
DICT = $(NAME)_dict
GEMSRC = libsbsgem/TGEMSBSBox.cxx \
libsbsgem/TGEMSBSDBManager.cxx \
libsbsgem/TGEMSBSGEMChamber.cxx \
libsbsgem/TGEMSBSGEMHit.cxx \
libsbsgem/TGEMSBSGEMPlane.cxx \
libsbsgem/TGEMSBSGEMSimHitData.cxx \
libsbsgem/TGEMSBSSimAuxi.cxx \
libsbsgem/TGEMSBSSimDigitization.cxx \
libsbsgem/TGEMSBSSpec.cxx
#libsbsgem/TGEMSBSSimFile.cxx \
#libsbsgem/TGEMSBSSimEvent.cxx \
#libsbsgem/TGEMSBSGeant4File.cxx
#libsbsgem/TGEMSBSSimDecoder.cxx
SRC = src/g4sbs_data.cxx \
src/g4sbs_tree.cxx \
src/TSBSDBManager.cxx \
src/TSBSGeant4File.cxx \
src/TSBSSimAuxi.cxx \
src/TSBSSimEvent.cxx \
src/TSBSSimDigitizer.cxx \
src/TSBSSimDetector.cxx \
src/TSBSSimData.cxx \
src/TSBSSimCher.cxx \
src/TSBSSimECal.cxx \
src/TSBSSimHCal.cxx \
src/TSBSSimScint.cxx \
src/TSBSSpec.cxx \
src/TSBSSimGEM.cxx
# src/TSBSSimFile.cxx \ #
# src/TSBSSimADC.cxx \ #
# src/TSBSSimTDC.cxx \ #
# src/TSBSSimMPD.cxx \ #
# src/TSBSSimDataEncoder.cxx \ #
# src/digsim_data.cxx \ #
# src/digsim_tree.cxx \ #
# src/TSBSSimDecoder.cxx \ #
SRC += $(GEMSRC)
OBJS = $(SRC:.cxx=.$(ObjSuf)) $(DICT).o
HDR = $(SRC:.cxx=.h) src/Linkdef.h
ROHDR = $(SRC:.cxx=.h) src/Linkdef.h
LIBSBSDIG = libsbsdig.so
PROGRAMS = $(LIBSBSDIG)
all: $(PROGRAMS)
$(LIBSBSDIG): $(OBJS)
$(LD) $(SOFLAGS) $^ -o $@ $(LDFLAGS)
clean:
@rm -f $(OBJS) $(PROGRAMS) *dict.*
$(DICT).cxx: $(ROHDR)
$(ROOTCINT) -f $@ -c $(SOLINCLUDE) $^
%.$(ObjSuf): %.$(SrcSuf)
$(CXX) $(CXXFLAGS) -c -o $@ $<