]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/Makefile.flugg
Moved from AliTransbit to AliL3Transbit.
[u/mrichter/AliRoot.git] / AliGeant4 / Makefile.flugg
CommitLineData
615bb363 1# $Id$
2
3############################### AliGeant4 Makefile #############################
4
5# Include Geant4 specific definitions
6
7include $(G4INSTALL)/config/architecture.gmk
8
9# Include machine specific definitions
10
11include $(ALICE_ROOT)/conf/GeneralDef
12include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
13
14# Include Alice Geant4 specific definitions
15
16NEED_G4_LIBS := 1
17include $(ALICE_ROOT)/conf/Geant4.gmk
18
19PACKAGE = AliGeant4
20TARGET = aligeant4
21
22# C++ sources
23
24#SRCS = $(wildcard *.cxx)
25#SRCS := $(filter-out $(TARGET).cxx,$(SRCS))
26
27SRCS1 := $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: global" {} \; | sed sx./xxg )
28SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: geometry" {} \; | sed sx./xxg )
29SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: visualization" {} \; | sed sx./xxg )
30
31SRCS2 := $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: digits+hits" {} \; | sed sx./xxg )
32SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: event" {} \; | sed sx./xxg )
33SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: run" {} \; | sed sx./xxg )
34
35# C++ Headers
36
37HDRS = $(wildcard *.icc) $(wildcard *.h)
38
39# Library Root dictionary
40# only for selected classes
41# (temporarily excluded for OSF1 due to compilation errors)
42
43ifneq ($(ALICE_TARGET),OSF1)
44DICT = AliGeant4Cint.cxx
45DICTH = AliRunConfiguration.h AliGeant4LinkDef.h
46DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
47endif
48
49# C++ Objects
50
51OBJS1 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS1))
52OBJS2 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS2)) $(DICTO)
53
54# Program C++ source, objects
55
56PSRC = $(TARGET).cxx
57POBJ = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC))
58
59# C++ compilation flags
60
61CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \
62 -I$(ALICE_ROOT)/TGeant4
63
64##### TARGETS #####
65
66# Target
67
68SLIBRARY = $(LIBDIR)/libAliGeant4_1.$(SL) $(LIBDIR)/libAliGeant4_2.$(SL)
69ALIBRARY = $(LIBDIR)/libAliGeant4_1.a $(LIBDIR)/libAliGeant4_2.a
70PROGRAM = $(BINDIR)/$(TARGET)
71
72default: $(SLIBRARY) $(PROGRAM)
73archived: $(ALIBRARY)
74
75$(LIBDIR)/libAliGeant4_1.$(SL): $(OBJS1)
76$(LIBDIR)/libAliGeant4_1.a: $(OBJS1)
77
78$(LIBDIR)/libAliGeant4_2.$(SL): $(OBJS2)
79$(LIBDIR)/libAliGeant4_2.a: $(OBJS2)
80
81$(BINDIR)/$(TARGET): $(POBJ)
82
83$(DICT): $(DICTH)
84
85depend: $(SRCS1) $(SRCS2)
86
87clean: macroclean
88
89#HEADERS = $(filter-out %LinkDef.h,$(HDRS))
90
91# filter-out Geant3 dependent libraries (ZDC requires symbols from G3)
92# and add Geant4 dependent ones
93ALILIBS := $(filter-out -lTGeant3,$(ALILIBS))
94ALILIBS := $(filter-out -lZDC,$(ALILIBS))
95ALILIBS := $(filter-out -lITS,$(ALILIBS))
96ALILIBS += -lAliGeant4_2 -lAliGeant4_1 -lTGeant4_2 -lTGeant4_1
97
98LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \
99 -lTHijing -lhijing -lTMevSim -lmevsim -lTHbtp -lHBTP \
100 $(G4LDLIBS)
101
102TOCLEAN = $(OBJS) $(POBJ) *Cint.cxx *Cint.h
103
104CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
105
106############################### General Macros ################################
107
108include $(ALICE_ROOT)/conf/GeneralMacros
109
110
111# Geant4 specific compiler flags
112
113CXXFLAGS += $(CPPFLAGS)
114
115
116############################ Dependencies #####################################
117
118-include tgt_$(ALICE_TARGET)/Make-depend