]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/Makefile
Cosmetic changes.
[u/mrichter/AliRoot.git] / AliGeant4 / Makefile
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 # C++ Headers
28
29 HDRS          =  $(wildcard *.icc) $(wildcard *.h)
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          = AliGeant4Cint.cxx
37 DICTH         = AliRunConfiguration.h AliGeant4LinkDef.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       
54
55 ##### TARGETS #####
56  
57 # Target
58
59 SLIBRARY        = $(LIBDIR)/libAliGeant4.$(SL)
60 ALIBRARY        = $(LIBDIR)/libAliGeant4.a
61 PROGRAM         = $(BINDIR)/$(TARGET)
62
63 default:        $(SLIBRARY) $(PROGRAM)
64
65 $(LIBDIR)/libAliGeant4.$(SL):           $(OBJS)
66 $(LIBDIR)/libAliGeant4.a:               $(OBJS)
67
68 $(BINDIR)/$(TARGET):                    $(POBJ)
69
70 $(DICT):                                $(DICTH)
71
72 depend:                                 $(SRCS)
73
74 clean: macroclean
75
76 #HEADERS =      $(filter-out %LinkDef.h,$(HDRS))
77
78 # filter-out Geant3 dependent libraries (ZDC requires symbols from G3)
79 # and add Geant4 dependent ones
80 ALILIBS := $(filter-out -lTGeant3,$(ALILIBS))
81 ALILIBS := $(filter-out -lZDC,$(ALILIBS))
82 ALILIBS := $(filter-out -lITS,$(ALILIBS))
83 ALILIBS += -lAliGeant4 -lTGeant4
84
85 LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \
86         -lTHijing -lhijing  -lTMevSim -lmevsim $(G4LDLIBS)
87
88 TOCLEAN       = $(OBJS) $(POBJ) *Cint.cxx *Cint.h
89
90 CHECKS        = $(patsubst %.cxx,check/%.viol,$(SRCS))
91
92 ############################### General Macros ################################
93
94 include $(ALICE_ROOT)/conf/GeneralMacros
95
96
97 # Geant4 specific compiler flags
98
99 CXXFLAGS += $(CPPFLAGS)
100
101
102 ############################ Dependencies #####################################
103
104 -include tgt_$(ALICE_TARGET)/Make-depend