]>
Commit | Line | Data |
---|---|---|
04c6e46a | 1 | # $Id$ |
2 | ||
3 | ############################### AliFluka Makefile ############################# | |
4 | ||
5 | # Include Geant4 specific definitions | |
6 | ||
7 | include $(FLUGGINSTALL)/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/Fluka.gmk | |
18 | ||
19 | PACKAGE = AliFluka | |
20 | TARGET = alifluka | |
21 | ||
22 | # C++ sources | |
23 | ||
24 | SRCS = $(wildcard *.cxx) | |
25 | SRCS := $(filter-out $(TARGET).cxx,$(SRCS)) | |
26 | ||
27 | # C++ Headers | |
28 | ||
29 | HDRS = $(wildcard *.icc) $(wildcard *.h) $(wildcard *.hh) | |
30 | ||
31 | # Library Root dictionary | |
32 | # only for selected classes | |
33 | # (temporarily excluded for OSF1 due to compilation errors) | |
34 | ||
35 | ifneq ($(ALICE_TARGET),OSF1) | |
36 | #DICT = AliFlukaCint.cxx | |
37 | #DICTH = AliFlukaLinkDef.h | |
38 | #DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT)) | |
39 | endif | |
40 | ||
41 | # C++ Objects | |
42 | ||
43 | OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO) | |
44 | ||
45 | # Program C++ source, objects | |
46 | ||
47 | PSRC = $(TARGET).cxx | |
48 | POBJ = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC)) | |
49 | ||
50 | # C++ compilation flags | |
51 | ||
52 | CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \ | |
53 | -I$(ALICE_ROOT)/TGeant4 -I$(ALICE_ROOT)/AliGeant4 \ | |
54 | -I$(ALICE_ROOT)/STRUCT | |
55 | ||
56 | ##### TARGETS ##### | |
57 | ||
58 | # Target | |
59 | ||
60 | SLIBRARY = $(LIBDIR)/libAliFluka.$(SL) | |
61 | ALIBRARY = $(LIBDIR)/libAliFluka.a | |
62 | PROGRAM = $(BINDIR)/$(TARGET) | |
63 | ||
64 | default: $(SLIBRARY) $(PROGRAM) | |
65 | ||
66 | $(LIBDIR)/libAliFluka.$(SL): $(OBJS) | |
67 | $(LIBDIR)/libAliFluka.a: $(OBJS) | |
68 | ||
69 | $(BINDIR)/$(TARGET): $(POBJ) | |
70 | ||
71 | $(DICT): $(DICTH) | |
72 | ||
73 | depend: $(SRCS) | |
74 | ||
75 | clean: macroclean | |
76 | ||
77 | #HEADERS = $(filter-out %LinkDef.h,$(HDRS)) | |
78 | ||
79 | # filter-out Geant3 dependent libraries (ZDC requires symbols from G3) | |
80 | # and add Geant4 dependent ones | |
81 | ALILIBS := $(filter-out -lTGeant3,$(ALILIBS)) | |
82 | ALILIBS := $(filter-out -lZDC,$(ALILIBS)) | |
83 | ALILIBS := $(filter-out -lITS,$(ALILIBS)) | |
84 | ALILIBS += -lAliFluka -lAliGeant4_1 -lTGeant4_1 | |
85 | ||
86 | LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \ | |
87 | -lTHijing -lhijing -lTMevSim -lmevsim -lTHbtp -lHBTP \ | |
88 | $(G4LDLIBS) | |
89 | ||
90 | TOCLEAN = $(OBJS) $(POBJ) *Cint.cxx *Cint.h | |
91 | ||
92 | CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS)) | |
93 | ||
94 | ############################### General Macros ################################ | |
95 | ||
96 | include $(ALICE_ROOT)/conf/GeneralMacros | |
97 | ||
98 | ||
99 | # Geant4 specific compiler flags | |
100 | ||
101 | CXXFLAGS += $(CPPFLAGS) | |
102 | ||
103 | ||
104 | ############################ Dependencies ##################################### | |
105 | ||
106 | -include tgt_$(ALICE_TARGET)/Make-depend |