-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·62 lines (37 loc) · 1.2 KB
/
Makefile
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
OBJS_LIB = $(shell ls src/*.cpp | sed 's/\.cpp/.o/')
PROGS = $(shell ls src/*.C | sed 's/\.C//' | sed 's/src\///')
INCLUDES = -I./include -I$(shell root-config --incdir) -I$(BOOSTROOT) -I${DK2NU}/include
DEPLIBS=$(shell root-config --libs) -lEG
CC = g++
COPTS = -fPIC -DLINUX -O0 -g $(shell root-config --cflags)
FLAGS = -g
all: lib programs doxy
lib: libppfx.so
libppfx.so: $(OBJS_LIB)
if [ ! -d lib ]; then mkdir -p lib; fi
$(CC) -shared -o lib/$@ $^ -L${DK2NU_LIB} -ldk2nuTree
programs: $(PROGS)
echo making $(PROGS)
$(PROGS): % : src/%.o $(OBJS_LIB) libppfx.so
if [ ! -d bin ]; then mkdir -p bin; fi
$(CC) -Wall -o bin/$@ $< $(PPFX_OBJS) $(DEPLIBS) -L$(PPFX_DIR)/lib -lppfx -L${DK2NU_LIB} -ldk2nuTree
%.o: %.cpp
$(CC) $(COPTS) $(INCLUDES) -c -o $@ $<
%.o: %.cc
$(CC) $(COPTS) $(INCLUDES) -c -o $@ $<
%.o: %.C
$(CC) $(COPTS) $(INCLUDES) -c -o $@ $<
%.o: %.cxx
$(CC) $(COPTS) $(INCLUDES) -c -o $@ $<
doxy:
doxygen doxygen/config_doxygen
clean: deldoxy delobj dellib delbin
delobj:
-rm src/*.o
dellib:
if [ -d lib ]; then rm -rf lib; fi
delbin:
if [ -d bin ]; then rm -rf bin; fi
deldoxy:
if [ -d html ]; then rm -rf html; fi
if [ -d latex ]; then rm -rf latex; fi