-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
61 lines (47 loc) · 1.93 KB
/
GNUmakefile
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
60
61
# compiler
CXX = g++
CXXFLAGS = -g -fPIC
# include options for this package
INCFLAGS = -I.
INCFLAGS += $(shell root-config --cflags)
INCFLAGS += $(shell larlite-config --includes)
INCFLAGS += $(shell larlite-config --includes)/../UserDev
INCFLAGS += $(shell larlite-config --includes)/../UserDev/BasicTool
INCFLAGS += $(shell larlite-config --includes)/../UserDev/SelectionTool
INCFLAGS += -I$(LARLITE_USERDEVDIR)
INCFLAGS += $(shell larcv-config --includes)
INCFLAGS += $(shell larlitecv-config --includes)
##INCFLAGS += -I$(LAROPENCV_BASEDIR)
INCFLAGS += -I$(LARCV_INCDIR)/LArOpenCVHandle/
LDFLAGS += $(shell root-config --ldflags --libs)
LDFLAGS += $(shell larlite-config --libs)
LDFLAGS += $(shell larlite-config --libs) -lBasicTool_GeoAlgo
LDFLAGS += $(shell larlite-config --libs) -lBasicTool_FhiclLite
LDFLAGS += $(shell larlite-config --libs) -lSelectionTool_OpT0FinderAna -lSelectionTool_OpT0FinderApp \
-lSelectionTool_OpT0PhotonLibrary -lSelectionTool_OpT0FinderAlgorithms -lSelectionTool_OpT0FinderBase
LDFLAGS += $(shell larcv-config --libs)
LDFLAGS += $(shell larlitecv-config --libs)
#LDFLAGS += -lLArOpenCV_Core
#LDFLAGS += -lLArOpenCV_ImageClusterBase
#LDFLAGS += -lLArOpenCV_ImageClusterAlgoFunction
#LDFLAGS += -lLArOpenCV_ImageClusterAlgoData
#LDFLAGS += -lLArOpenCV_ImageClusterAlgoClass
CXXFLAGS += $(INCFLAGS)
# note: llcvprocessor headers and libraries are in larlitecv/build/include and lib
#LDFLAGS += -l
# platform-specific options
OSNAME = $(shell uname -s)
HOST = $(shell uname -n)
OSNAMEMODE = $(OSNAME)
PROGRAMS = larflow_imgcrop larflow_imgcrop_data
PROGSRC = $(addsuffix .cxx, $(PROGRAMS) )
SRCS = $(filter-out $(PROGSRC),$(wildcard *.cxx))
OBJS = $(addprefix obj/,$(patsubst %.cxx, %.o, $(SRCS)))
BINS = $(addprefix bin/,$(PROGRAMS))
all: $(OBJS) $(BINS)
clean:
rm $(BINS)
bin/%: %.cxx $(OBJS)
$(CXX) $(CXXFLAGS) $*.cxx -o $@ $(OBJS) $(LDFLAGS)
obj/%.o: %.cxx
$(CXX) $(CXXFLAGS) -c $*.cxx -o $@