Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (45 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
56 lines (45 loc) · 1.51 KB
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
# Simple Makefile to build DAIDALUS library and example applications
NAME=DAIDALUS
MAJOR=2
MINOR=.0.2
VERSION=$(NAME)$(MAJOR)
RELEASE=$(NAME)v$(MAJOR)$(MINOR)
SRC = $(wildcard src/*.cpp)
OBJS = $(SRC:.cpp=.o)
INCLUDEFLAGS = -Iinclude
CXXFLAGS = $(INCLUDEFLAGS) -Wall -O
ifndef AR
AR = ar
endif
ifndef RANLIB
RANLIB = ranlib
endif
all: clean lib examples
lib: $(OBJS)
@echo "** Building lib/$(RELEASE).a library"
@test -d lib || mkdir lib
@$(AR) -cr lib/$(RELEASE).a $(OBJS) && $(RANLIB) lib/$(RELEASE).a
@cd lib;ln -sf $(RELEASE).a $(VERSION).a
install:
mkdir -p $(DESTDIR)/usr/local/lib
install ${INSTALL_OPTS} lib/$(RELEASE).a $(DESTDIR)/usr/local/lib/libdaidalus.a
examples:
@echo "** Building example applications"
$(CXX) -o DaidalusExample $(CXXFLAGS) examples/DaidalusExample.cpp lib/$(RELEASE).a
$(CXX) -o DaidalusAlerting $(CXXFLAGS) examples/DaidalusAlerting.cpp lib/$(RELEASE).a
$(CXX) -o DaidalusBatch $(CXXFLAGS) examples/DaidalusBatch.cpp examples/DaidalusProcessor.cpp lib/$(RELEASE).a
@echo
@echo "** To run DaidalusExample type:"
@echo "./DaidalusExample"
@echo
@echo "** To run DaidalusAlerting type, e.g.,"
@echo "./DaidalusAlerting --conf ../Configurations/DO_365A_no_SUM.conf ../Scenarios/H1.daa"
@echo
@echo "** To run DaidalusBatch type, e.g.,"
@echo "./DaidalusBatch --conf ../Configurations/DO_365A_no_SUM.conf ../Scenarios/H1.daa"
@echo
doc:
doxygen
clean:
rm -f DaidalusExample DaidalusAlerting DaidalusBatch src/*.o examples/*.o lib/*.a
.PHONY: all lib examples doc