Skip to content

Commit 5fa1df9

Browse files
author
benjamin Quilain
committed
Added possibility to run leaf w/o BONSAI installation
1 parent f8ea8c9 commit 5fa1df9

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

example/GNUmakefile_nobonsai

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Makefile by Guillaume Pronost for LEAF example @ 2020/02/09
2+
3+
OSNAME = $(shell uname -s)
4+
5+
include ../Makefile/Makefile.${OSNAME}
6+
7+
8+
# set compiler options for ROOT
9+
CXXFLAGS += $(shell root-config --cflags)
10+
CXXFLAGS += '-fPIC' -std=c++11 -Wall -Wpedantic -Wno-long-long
11+
12+
INCFLAGS = -I. -I$(shell root-config --incdir)
13+
INCFLAGS += -I$(WCSIMDIR)/include
14+
INCFLAGS += -I$(LEAFDIR)/leaf
15+
INCFLAGS += -I$(LEAFDIR)/leaf/DataModel
16+
17+
LIBS += -L${WCSIMDIR} -lWCSimRoot
18+
LIBS += $(shell root-config --libs) -lMinuit
19+
LIBS_LEAF += -L${LEAFDIR}/lib -lDataModelLite -lHKManager -lLEAF #-lHKAstroAnalysis
20+
21+
22+
OBJECT = analysis
23+
24+
all: $(OBJECT)
25+
26+
analysis: analysis.o
27+
@echo '<< compiling bin analysis >>'
28+
@$(CXX) -g $(CXXFLAGS) -o $@ $^ $(LIBS) $(LIBS_LEAF)
29+
30+
31+
# default rules
32+
.cc.o:
33+
@echo '<< compiling' $< '>>'
34+
@$(CXX) $(CXXFLAGS) $(INCFLAGS) -c $<
35+
36+
%.o: %.cc %.hh
37+
@echo '<< compiling' $< '>>'
38+
@$(CXX) $(CXXFLAGS) $(INCFLAGS) -c -o $@ $<
39+
40+
%.o: %.cpp
41+
@echo '<< compiling' $< '>>'
42+
@$(CXX) $(CXXFLAGS) $(INCFLAGS) -c -o $@ $<
43+
44+
45+
%.o: %.C %.h
46+
@echo '<< compiling' $< '>>'
47+
@$(CXX) $(CXXFLAGS) $(INCFLAGS) -c -o $@ $<
48+
49+
# cleaner
50+
clean:
51+
@echo '<< cleaning >>'
52+
@rm -f ./*.o
53+
@rm -f ./lib*.so
54+
@rm -f ./bin/*
55+
@rm -f $(OBJECT)
56+

example/analysis.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include "LEAF.hh"
2828
#include "HKManager.hh"
29+
#define WITH_BONSAI
2930
#ifdef WITH_BONSAI
3031
#include "WCSimBonsai.hh"
3132
#endif

0 commit comments

Comments
 (0)