1 | # GNUmakefile for base |
---|
2 | # $Id: GNUmakefile 2804 2008-10-09 12:10:06Z biktem $ |
---|
3 | # D. De Marco created Jan, 23 2002 |
---|
4 | # |
---|
5 | |
---|
6 | name := macros |
---|
7 | |
---|
8 | ifndef ESAFINSTALL |
---|
9 | #ESAFINSTALL = ../.. |
---|
10 | ESAFINSTALL = /home/naumov/work/ShowersGenerators/esaf |
---|
11 | endif |
---|
12 | |
---|
13 | ESAFPACKAGES = $(ESAFINSTALL)/packages |
---|
14 | |
---|
15 | include $(ESAFINSTALL)/packages/config.gmk |
---|
16 | |
---|
17 | RCINTFLAGS = -I$(ESAFPACKAGES)/common/root/include |
---|
18 | CXXFLAGS += $(RCINTFLAGS) |
---|
19 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/detector/electronics/include |
---|
20 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/detector/optics/include |
---|
21 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/detector/G4Detector/include |
---|
22 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/base/include |
---|
23 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/config/include |
---|
24 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/radiativetransfer/include |
---|
25 | CXXFLAGS += -I $(ESAFPACKAGES)/simulation/lightsources/include |
---|
26 | CXXFLAGS += -I $(ESAFPACKAGES)/common/root/include |
---|
27 | CXXFLAGS += -I $(ESAFPACKAGES)/common/gui/include |
---|
28 | |
---|
29 | libs = gui electronics optics G4Detector electronics config radiativetransfer lightsources base root |
---|
30 | |
---|
31 | libraries = $(patsubst %,-l%,$(libs)) |
---|
32 | libraries += -lSimuEvent |
---|
33 | |
---|
34 | sources := $(wildcard *.h) |
---|
35 | objects := $(patsubst %.h,%.so,$(sources)) |
---|
36 | dict := $(patsubst %.h,%Dict.cc,$(sources)) |
---|
37 | |
---|
38 | |
---|
39 | $(name): $(objects) |
---|
40 | |
---|
41 | |
---|
42 | $(objects): %.so: %.h |
---|
43 | rm -f `echo $< |sed 's/.h$$/Dict.cc/'` `echo $< |sed 's/.h$$/Dict.h/'` |
---|
44 | rootcint -f `echo $< |sed 's/.h$$/Dict.cc/'` -c $(RCINTFLAGS) $< `echo $< |sed 's/.h$$/LinkDef.hh/'` |
---|
45 | $(CXX) --shared -L $(LIBDIR) $(LDFLAGS) $(CXXFLAGS) `echo $< |sed 's/.h$$/.C/'` `echo $< |sed 's/.h$$/Dict.cc/'` $(libraries) -o $@ |
---|
46 | rm `echo $< |sed 's/.h$$/Dict.cc/'` `echo $< |sed 's/.h$$/Dict.h/'` |
---|
47 | |
---|
48 | clean: |
---|
49 | rm *.so |
---|