3 ############################### AliGeant4 Makefile #############################
5 # Include Geant4 specific definitions
7 include $(G4INSTALL)/config/architecture.gmk
9 # Include machine specific definitions
11 include $(ALICE_ROOT)/conf/GeneralDef
12 include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
14 # Include Alice Geant4 specific definitions
17 include $(ALICE_ROOT)/conf/Geant4.gmk
24 #SRCS = $(wildcard *.cxx)
25 #SRCS := $(filter-out $(TARGET).cxx,$(SRCS))
27 SRCS1 := $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: global" {} \; | sed sx./xxg )
28 SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: geometry" {} \; | sed sx./xxg )
29 SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: visualization" {} \; | sed sx./xxg )
31 SRCS2 := $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: digits+hits" {} \; | sed sx./xxg )
32 SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: event" {} \; | sed sx./xxg )
33 SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: run" {} \; | sed sx./xxg )
37 HDRS = $(wildcard *.icc) $(wildcard *.h)
39 # Library Root dictionary
40 # only for selected classes
41 # (temporarily excluded for OSF1 due to compilation errors)
43 ifneq ($(ALICE_TARGET),OSF1)
44 DICT = AliGeant4Cint.cxx
45 DICTH = AliRunConfiguration.h AliGeant4LinkDef.h
46 DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
51 OBJS1 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS1))
52 OBJS2 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS2)) $(DICTO)
54 # Program C++ source, objects
57 POBJ = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC))
59 # C++ compilation flags
61 CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \
62 -I$(ALICE_ROOT)/TGeant4
68 SLIBRARY = $(LIBDIR)/libAliGeant4_1.$(SL) $(LIBDIR)/libAliGeant4_2.$(SL)
69 ALIBRARY = $(LIBDIR)/libAliGeant4_1.a $(LIBDIR)/libAliGeant4_2.a
70 PROGRAM = $(BINDIR)/$(TARGET)
72 default: $(SLIBRARY) $(PROGRAM)
75 $(LIBDIR)/libAliGeant4_1.$(SL): $(OBJS1)
76 $(LIBDIR)/libAliGeant4_1.a: $(OBJS1)
78 $(LIBDIR)/libAliGeant4_2.$(SL): $(OBJS2)
79 $(LIBDIR)/libAliGeant4_2.a: $(OBJS2)
81 $(BINDIR)/$(TARGET): $(POBJ)
85 depend: $(SRCS1) $(SRCS2)
89 #HEADERS = $(filter-out %LinkDef.h,$(HDRS))
91 # filter-out Geant3 dependent libraries (ZDC requires symbols from G3)
92 # and add Geant4 dependent ones
93 ALILIBS := $(filter-out -lTGeant3,$(ALILIBS))
94 ALILIBS := $(filter-out -lZDC,$(ALILIBS))
95 ALILIBS := $(filter-out -lITS,$(ALILIBS))
96 ALILIBS += -lAliGeant4_2 -lAliGeant4_1 -lTGeant4_2 -lTGeant4_1
98 LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \
99 -lTHijing -lhijing -lTMevSim -lmevsim -lTHbtp -lHBTP \
102 TOCLEAN = $(OBJS) $(POBJ) *Cint.cxx *Cint.h
104 CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
106 ############################### General Macros ################################
108 include $(ALICE_ROOT)/conf/GeneralMacros
111 # Geant4 specific compiler flags
113 CXXFLAGS += $(CPPFLAGS)
116 ############################ Dependencies #####################################
118 -include tgt_$(ALICE_TARGET)/Make-depend