-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
41 lines (29 loc) · 1018 Bytes
/
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
ROOTCFLAGS = $(shell root-config --cflags)
ROOTLIBS = $(shell root-config --libs) -lMinuit
ROOTGLIBS = $(shell root-config --glibs)
CXX = gcc -fPIC
LD = gcc
LDFLAGS = -g
SOFLAGS = -shared -O3
CXXFLAGS = $(ROOTCFLAGS) -fPIC
INCLUDE_FLAGS =
LDLIBS = $(ROOTLIBS)
GLIBS = $(ROOTGLIBS)
EXE = cfit
INC = cfit.h
SRC = cfit.cxx
OBJS = cfit.o
LIB = libCFIT.so
all: $(LIB)
$(LIB): $(INC) $(SRC)
@echo "####### Generating dictionary"
@rootcint -f cfitDict.cxx -c -p $(CXXFLAGS) \
$(INCLUDE_FLAGS) -I. $(INC) LinkDef.h
@echo "####### Building library $(LIB)"
@$(CXX) $(SOFLAGS) $(CXXFLAGS) $(ROOTLIBS) $(INCLUDE_FLAGS) -I. $(SRC) \
cfitDict.cxx -o $(LIB) $(ROOTLIBS)
@echo "####### Removing generated dictionary"
@rm -f cfitDict.cxx cfitDict.h
@rm -f *.o
clean:
@rm -f $(OBJS) $(EXE) cfitDict.cxx cfitDict.h $(LIB)