]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/Makefile.flugg
Mostly minor style modifications to be ready for cloning with EMCAL
[u/mrichter/AliRoot.git] / AliGeant4 / Makefile.flugg
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)
25 #SRCS          := $(filter-out $(TARGET).cxx,$(SRCS))
26
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 )
30
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 )
34
35 # C++ Headers
36
37 HDRS          =  $(wildcard *.icc) $(wildcard *.h)
38
39 # Library Root dictionary
40 # only for selected classes
41 # (temporarily excluded for OSF1 due to compilation errors)
42
43 ifneq ($(ALICE_TARGET),OSF1)
44 DICT          = AliGeant4Cint.cxx
45 DICTH         = AliRunConfiguration.h AliGeant4LinkDef.h
46 DICTO         = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
47 endif
48
49 # C++ Objects
50
51 OBJS1          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS1))
52 OBJS2          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS2)) $(DICTO)
53
54 # Program C++ source, objects
55
56 PSRC          = $(TARGET).cxx
57 POBJ          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC))
58
59 # C++ compilation flags
60
61 CXXFLAGS      = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \
62                 -I$(ALICE_ROOT)/TGeant4       
63
64 ##### TARGETS #####
65  
66 # Target
67
68 SLIBRARY        = $(LIBDIR)/libAliGeant4_1.$(SL) $(LIBDIR)/libAliGeant4_2.$(SL)
69 ALIBRARY        = $(LIBDIR)/libAliGeant4_1.a  $(LIBDIR)/libAliGeant4_2.a
70 PROGRAM         = $(BINDIR)/$(TARGET)
71
72 default:        $(SLIBRARY) $(PROGRAM)
73 archived:       $(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
85 depend:                                 $(SRCS1) $(SRCS2)
86
87 clean: 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
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
97
98 LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \
99         -lTHijing -lhijing  -lTMevSim -lmevsim  -lTHbtp -lHBTP \
100         $(G4LDLIBS)
101
102 TOCLEAN       = $(OBJS) $(POBJ) *Cint.cxx *Cint.h
103
104 CHECKS        = $(patsubst %.cxx,check/%.viol,$(SRCS))
105
106 ############################### General Macros ################################
107
108 include $(ALICE_ROOT)/conf/GeneralMacros
109
110
111 # Geant4 specific compiler flags
112
113 CXXFLAGS += $(CPPFLAGS)
114
115
116 ############################ Dependencies #####################################
117
118 -include tgt_$(ALICE_TARGET)/Make-depend