1 | # ESAF : Euso Simulation and Analysis Framework |
---|
2 | # GNUmakefile for optics |
---|
3 | # $Id: GNUmakefile 2206 2005-10-17 11:45:03Z thea $ |
---|
4 | # A.Thea, J.Watts created Mar, 17 2004 |
---|
5 | |
---|
6 | PACKAGENAME := dettools |
---|
7 | |
---|
8 | ifndef ESAFINSTALL |
---|
9 | ESAFINSTALL = ../../../.. |
---|
10 | endif |
---|
11 | |
---|
12 | ESAFPACKAGES = $(ESAFINSTALL)/packages |
---|
13 | # Config parameters |
---|
14 | |
---|
15 | include $(ESAFINSTALL)/packages/config.gmk |
---|
16 | |
---|
17 | # Include paths needed for rootcint dictionary generation |
---|
18 | |
---|
19 | INCLUDES += -I$(ESAFPACKAGES)/common/base/include |
---|
20 | INCLUDES += -I$(ESAFPACKAGES)/common/root/include |
---|
21 | INCLUDES += -I$(ESAFPACKAGES)/common/eventviewer/include |
---|
22 | INCLUDES += -I$(ESAFPACKAGES)/simulation/detector/electronics/include |
---|
23 | INCLUDES += -I$(ESAFPACKAGES)/simulation/detector/optics/include |
---|
24 | INCLUDES += -I$(ESAFPACKAGES)/simulation/radiativetransfer/include |
---|
25 | INCLUDES += -I$(ESAFPACKAGES)/simulation/framework/include |
---|
26 | INCLUDES += -I$(ESAFPACKAGES)/simulation/tools/include |
---|
27 | |
---|
28 | # headers and settings needed for the local library compilation |
---|
29 | CXXFLAGS += $(INCLUDES) |
---|
30 | |
---|
31 | include $(ESAFINSTALL)/packages/makeso.gmk |
---|
32 | |
---|
33 | # following part of makefile is used to build a reduced rootlibrary that |
---|
34 | # contains just the classes needed to read rootfile |
---|
35 | |
---|
36 | shared := OpticsAnalysis |
---|
37 | |
---|
38 | LIBTARGET := lib$(shared).$(SHEX) |
---|
39 | linkdef := OALinkDef |
---|
40 | dict := G___OADict |
---|
41 | |
---|
42 | libclasses := OADBTree OADBHeader OADBPhotons OADBConverter |
---|
43 | |
---|
44 | pureheaders := |
---|
45 | |
---|
46 | dicts := $(patsubst %,%.cc,$(dict)) |
---|
47 | dicth := $(dicts:.cc=.h) |
---|
48 | libheaders := $(patsubst %,include/%.hh,$(libclasses) $(pureheaders) $(linkdef)) |
---|
49 | libsources := $(patsubst %,src/%.cc,$(libclasses)) $(dicts) |
---|
50 | libobjects := $(patsubst %,$(PACKAGETMP)/%.o,$(libclasses)) |
---|
51 | |
---|
52 | liblink := |
---|
53 | libldflags := -L$(shell root-config --libdir) |
---|
54 | |
---|
55 | $(LIBDIR)/$(LIBTARGET): $(PACKAGELIB) $(PACKAGETMP)/obj.last |
---|
56 | @echo Building $(shared) dictionary... |
---|
57 | @rootcint -f $(dicts) -c $(libheaders) |
---|
58 | @echo Building $(LIBTARGET)... |
---|
59 | @$(CXX) $(SO_OPTS) $(CXXFLAGS) $(dicts) $(libobjects) -L$(LIBDIR) $(libldflags) $(liblink) -o $@ |
---|
60 | @echo Cleaning temporary files... |
---|
61 | @rm -r $(dicts) $(dicth) |
---|
62 | |
---|
63 | rootlib: $(LIBDIR)/$(LIBTARGET) |
---|