forked from ANNIEsoft/WCSim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile_full
92 lines (68 loc) · 2.92 KB
/
GNUmakefile_full
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# $Id: GNUmakefile,v 1.17 2006/09/04 15:43:27 t2k Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
G4DEBUG = 1
name := WCSim
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
#G4INSTALL = ../../..
G4INSTALL = $GEANT4_MAKEFULL_PATH
endif
G4SYSTEM=Linux-g++
ROOTCFLAGS := $(shell root-config --cflags) -DUSE_ROOT -fPIC
ROOTLIBS := $(shell root-config --libs)
LIBNAME := WCSim
# NOTE: Geant4.7.0 changes the way Maximum Step size is defined.
# We need extra code for versions 4.7.0 and above; eventually
# everyone should upgrade to geant4.7
ifneq (,$(findstring 4.7,$(G4INSTALL)))
GEANT4_7_0 = 0
else
GEANT4_7_0 = 1
endif
ifdef GEANT4_7_0
CPPFLAGS += -DGEANT4_7_0
endif
ifdef GCCVERS296
CPPFLAGS += -DUSE_STRSTREAM
endif
CPPFLAGS += -I$(ROOTSYS)/include $(ROOTCFLAGS)
EXTRALIBS += $(ROOTLIBS)
EXTRA_LINK_DEPENDENCIES :=
DOXYGEN_VERSION := $(shell doxygen --version 2>/dev/null)
ifdef DOXYGEN_VERSION
DOXYGEN_EXISTS = 1
else
DOXYGEN_EXISTS = 0
endif
.PHONY: all
all: rootcint lib bin shared libWCSim.a
# Note dependencies not yet set up right yet
ROOTSO := libWCSimRoot.so
ROOTSRC := ./src/WCSimRootEvent.cc ./include/WCSimRootEvent.hh ./src/WCSimRootGeom.cc ./include/WCSimRootGeom.hh ./include/WCSimPmtInfo.hh ./src/WCSimEnumerations.cc ./include/WCSimLAPPDInfo.hh ./include/WCSimLAPPDpulse.hh ./include/WCSimLAPPDpulseCluster.hh ./include/WCSimEnumerations.hh ./src/WCSimRootOptions.cc ./include/WCSimRootOptions.hh ./include/WCSimRootLinkDef.hh
ROOTOBJS := $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootEvent.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootGeom.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimPmtInfo.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimLAPPDInfo.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimLAPPDpulse.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimLAPPDpulseCluster.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimEnumerations.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootOptions.o $(G4WORKDIR)/tmp/$(G4SYSTEM)/WCSim/WCSimRootDict.o
shared: $(ROOTSRC) $(ROOTOBJS)
g++ -shared -O $(ROOTOBJS) -o $(ROOTSO) $(ROOTLIBS)
libWCSim.a : $(ROOTOBJS)
$(RM) $@
ar clq $@ $(ROOTOBJS)
./src/WCSimRootDict.cc : $(ROOTSRC)
rootcint -f ./src/WCSimRootDict.cc -c -I./include -I$(shell root-config --incdir) WCSimRootEvent.hh WCSimRootGeom.hh WCSimPmtInfo.hh WCSimLAPPDInfo.hh WCSimLAPPDpulse.hh WCSimLAPPDpulseCluster.hh WCSimEnumerations.hh WCSimRootOptions.hh WCSimRootLinkDef.hh
rootcint: ./src/WCSimRootDict.cc
doxy:
@if [ ${DOXYGEN_EXISTS} = 1 ]; \
then \
doxygen WCSim_doxygen_config; \
else\
echo "Error: doxygen program not found in path. Exiting"; \
fi
clean_wcsim:
echo $(G4WORKDIR);
$(RM) -r $(G4WORKDIR); $(RM) *.o *.a *.so *~ */*~ src/WCSimRootDict.h src/WCSimRootDict.cc;
@if [ -d "doc/doxygen" ]; \
then \
rm -r doc/doxygen; \
fi
include $(G4INSTALL)/config/binmake.gmk