]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | # $Id$ |
2 | ||
3 | ############################### AliGeant4 Makefile ############################# | |
4 | ||
5 | # Include Geant4 specific definitions | |
6 | ||
7 | include $(G4INSTALL)/config/architecture.gmk | |
8 | ||
9 | # Include machine specific definitions | |
10 | ||
11 | include $(ALICE_ROOT)/conf/GeneralDef | |
12 | include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET) | |
13 | ||
14 | # Include Alice Geant4 specific definitions | |
15 | ||
16 | NEED_G4_LIBS := 1 | |
17 | include $(ALICE_ROOT)/conf/Geant4.gmk | |
18 | ||
19 | PACKAGE = AliGeant4 | |
20 | TARGET = aligeant4 | |
21 | ||
22 | # C++ sources | |
23 | ||
24 | SRCS = $(wildcard *.cxx) | |
12656483 | 25 | SRCS := $(filter-out $(TARGET).cxx,$(SRCS)) |
676fb573 | 26 | |
27 | # C++ Headers | |
28 | ||
29 | HDRS = $(wildcard *.icc) $(wildcard *.h) | |
30 | ||
31 | # Library dictionary | |
32 | # only for selected classes | |
33 | ||
34 | DICT = AliGeant4Cint.cxx | |
35 | DICTH = AliRunConfiguration.h AliGeant4LinkDef.h | |
36 | DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT)) | |
37 | ||
38 | # C++ Objects | |
39 | ||
40 | OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO) | |
41 | ||
42 | # Program C++ source, objects | |
43 | ||
44 | PSRC = $(TARGET).cxx | |
45 | POBJ = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC)) | |
46 | ||
47 | # C++ compilation flags | |
48 | ||
12656483 | 49 | CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \ |
50 | -I$(ALICE_ROOT)/TGeant4 | |
676fb573 | 51 | |
52 | ##### TARGETS ##### | |
53 | ||
54 | # Target | |
55 | ||
56 | SLIBRARY = $(LIBDIR)/libAliGeant4.$(SL) | |
57 | ALIBRARY = $(LIBDIR)/lib/libAliGeant4.a | |
58 | PROGRAM = $(BINDIR)/$(TARGET) | |
59 | ||
60 | default: $(SLIBRARY) $(PROGRAM) | |
61 | ||
62 | $(LIBDIR)/libAliGeant4.$(SL): $(OBJS) | |
63 | ||
64 | $(BINDIR)/$(TARGET): $(POBJ) | |
65 | ||
66 | $(DICT): $(DICTH) | |
67 | ||
68 | depend: $(SRCS) | |
69 | ||
aecdbdac | 70 | clean: macroclean |
71 | ||
676fb573 | 72 | #HEADERS = $(filter-out %LinkDef.h,$(HDRS)) |
73 | ||
74 | # filter-out Geant3 dependent libraries (ZDC requires symbols from G3) | |
75 | # and add Geant4 dependent ones | |
76 | ALILIBS := $(filter-out -lTGeant3,$(ALILIBS)) | |
77 | ALILIBS := $(filter-out -lZDC,$(ALILIBS)) | |
78 | ALILIBS += -lTGeant4 -lAliGeant4 | |
79 | ||
5df35019 | 80 | LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia -lpythia -lpdf \ |
81 | -lTHijing -lhijing $(G4LDLIBS) | |
676fb573 | 82 | |
aecdbdac | 83 | TOCLEAN = $(OBJS) $(POBJ) *Cint.cxx *Cint.h |
676fb573 | 84 | |
85 | CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS)) | |
86 | ||
87 | ############################### General Macros ################################ | |
88 | ||
89 | include $(ALICE_ROOT)/conf/GeneralMacros | |
90 | ||
91 | ||
92 | # Geant4 specific compiler flags | |
93 | ||
94 | CXXFLAGS += $(CPPFLAGS) | |
95 | ||
96 | ||
97 | ############################ Dependencies ##################################### | |
98 | ||
99 | -include tgt_$(ALICE_TARGET)/Make-depend |