-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (33 loc) · 1.18 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
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs)
DEFINES =
CXX = g++
CXXFLAGS = -std=c++0x
CXXFLAGS += -O3 -Wall -fPIC $(DEFINES) -Wno-unused-result -Wshadow
CXXFLAGS += $(ROOTCFLAGS) -I./
LD = g++
LDFLAGS = -g -O -Wall -fPIC -Wl,-undefined,error
LDFLAGS += $(ROOTLIBS)
SOFLAGS = -shared
LIBS =
# Uncomment this line if you want to use a script to parse & colorize gcc output
# (You can also export this variable from your bashrc)
#GCCPARSER = 2>&1 | python ~/littleScripts/colorGcc.py
#------------------------------------------------------------------------------
SOURCES = $(wildcard src/*.cc)
OBJECTS = $(SOURCES:.cc=.o)
#------------------------------------------------------------------------------
lib: libSonicScrewdriver.so
libSonicScrewdriver.so: $(OBJECTS)
@echo "Building libSonicScrewdriver..."
$(LD) -L${ROOTSYS}/lib $+ -o $@ $(LIBS) $(SOFLAGS) $(LDFLAGS)
test:
@make -C test test
browseTest:
@make -C test browse
clean:
@echo "Cleaning..."
@rm -f $(OBJECTS) *.so
%.o: %.cc
$(CXX) $(CXXFLAGS) -c -o $@ $< $(LIBS) $(GCCPARSER)
.PHONY : test