-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
40 lines (28 loc) · 1.01 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
CC = g++
LD = g++
CFLAGS = -O3 -W -Wall `root-config --cflags`
LIBS = `root-config --libs` -Llib -lMinuit -lSpectrum -lEve -lGeom
INCLUDE = -Iinterface
OBJS = $(patsubst src/%.cc,lib/%.o,$(wildcard src/*.cc))
EXECS = $(patsubst bin/%.cc,%,$(wildcard bin/*.cc))
SCRIPTS = $(patsubst scripts/%.cc,%,$(wildcard scripts/*.cc))
EXEOBJS = $(patsubst bin/%.cc,lib/%.o,$(wildcard bin/*.cc))
# Exclude TestBufferReader from compilation since most systems that
# you'll compile this on don't have zmq installed.
EXEOBJS := $(filter-out lib/TestBufferReader.o,$(EXEOBJS))
EXECS := $(filter-out TestBufferReader,$(EXECS))
print-%:
@echo $*=$($*)
all: $(OBJS) $(EXEOBJS) $(SCRIPTS) $(EXECS)
lib/%.o : src/%.cc
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
lib/%.o : bin/%.cc
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
lib/%.o : scripts/%.cc
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
% : $(OBJS) lib/%.o
$(LD) $(LIBS) $(OBJS) $(LINKDEFOBJ) lib/[email protected] -o $@
clean:
rm -f $(EXECS) $(SCRIPTS) lib/*.o
cleanimg:
rm -f *.eps *.gif *.jpg plots/*.*