-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1.24 KB
/
Makefile
File metadata and controls
46 lines (35 loc) · 1.24 KB
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
CXX = g++
CXXFLAGS = -std=c++1y -fPIC
SOFLAGS = -shared -O3
INCLUDE = -I"./"
LIB = -L"./lib/"
libdir = /usr/lib/root/
ROOT_LIB := `root-config --libs --glibs`
ROOT_FLAGS := `root-config --cflags --ldflags`
DEPS = interface/CfgManager.h interface/CfgManagerT.h Makefile
DEPS_OBJS = lib/CfgManager.o
all: $(DEPS_OBJS) lib/libCFGMan.cxx lib/libCFGMan.so bin/test
lib/%.o: src/%.cc $(DEPS)
@echo " CXX $<"
@$ $(CXX) $(CXXFLAGS) -c -o $@ $< $(INCLUDE) $(ROOT_FLAGS)
lib/libCFGMan.cxx: interface/CfgManager.h interface/CfgManagerT.h interface/LinkDef.h
@$ rootcling -f $@ -rml libCFGMan.so -rmf lib/libCFGMan.rootmap $^
@$ rootcling -f $@ -rml libCFGMan.so -rmf lib/libCFGMan.rootmap $^
lib/libCFGMan.so: lib/libCFGMan.cxx lib/CfgManager.o $(DEPS_OBJS)
@echo " CXX $<"
@$ $(CXX) $(CXXFLAGS) $(SOFLAGS) -shared -o $@ $^ $(INCLUDE) $(ROOT_LIB) $(ROOT_FLAGS) $(LIB)
bin/%: test/%.cpp lib/libCFGMan.so
@echo " CXX $<"
@$ $(CXX) $(CXXFLAGS) -o $@ $^ $(INCLUDE) $(ROOT_LIB) $(ROOT_FLAGS) $(LIB)
install:
cp lib/libCFGMan.so $(libdir)
cp lib/libCFGMan_rdict.pcm $(libdir)
cp lib/libCFGMan.rootmap $(libdir)
uninstall:
rm $(libdir)/libCFGMan.so
rm $(libdir)/libCFGMan_rdict.pcm
rm $(libdir)/libCFGMan.rootmap
clean:
rm -fr tmp/*
rm -fr lib/*
rm -fr bin/*