source: JEM-EUSO/esaf_cc_at_lal/macros/lib/GNUmakefile @ 114

Last change on this file since 114 was 114, checked in by moretto, 11 years ago

actual version of ESAF at CCin2p3

File size: 1.6 KB
Line 
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
6name := macros
7
8ifndef ESAFINSTALL
9#ESAFINSTALL = ../..
10ESAFINSTALL = /home/naumov/work/ShowersGenerators/esaf
11endif
12
13ESAFPACKAGES = $(ESAFINSTALL)/packages
14
15include $(ESAFINSTALL)/packages/config.gmk
16
17RCINTFLAGS = -I$(ESAFPACKAGES)/common/root/include
18CXXFLAGS += $(RCINTFLAGS)
19CXXFLAGS += -I $(ESAFPACKAGES)/simulation/detector/electronics/include
20CXXFLAGS += -I $(ESAFPACKAGES)/simulation/detector/optics/include
21CXXFLAGS += -I $(ESAFPACKAGES)/simulation/detector/G4Detector/include
22CXXFLAGS += -I $(ESAFPACKAGES)/simulation/base/include
23CXXFLAGS += -I $(ESAFPACKAGES)/simulation/config/include
24CXXFLAGS += -I $(ESAFPACKAGES)/simulation/radiativetransfer/include
25CXXFLAGS += -I $(ESAFPACKAGES)/simulation/lightsources/include
26CXXFLAGS += -I $(ESAFPACKAGES)/common/root/include
27CXXFLAGS += -I $(ESAFPACKAGES)/common/gui/include
28
29libs = gui electronics optics G4Detector electronics config radiativetransfer lightsources base root
30
31libraries = $(patsubst %,-l%,$(libs))
32libraries += -lSimuEvent
33
34sources := $(wildcard *.h)
35objects := $(patsubst %.h,%.so,$(sources))
36dict    := $(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
48clean:
49        rm *.so
Note: See TracBrowser for help on using the repository browser.