-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (33 loc) · 1.24 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
include ./make.conf
PKGS += libevent libevent_openssl openssl libconfig++
override CXXFLAGS += -g -Wall -O2 -pipe $(shell pkg-config --cflags $(PKGS))
INC += -Iinclude
LDFLAGS := -Wl,--export-dynamic $(shell pkg-config --libs $(PKGS)) -ldl -pthread
CC := gcc
CXX := g++
BINARY := tripping-cyril
DEPS := build/String.o build/Global.o build/Socket.o build/Files.o build/Timer.o \
build/Module.o build/SimpleHTTPSocket.o build/TermUtils.o build/StackTrace.o \
build/Thread.o build/Pipe.o build/JobThread.o build/Listener.o build/Postgres.o \
build/Compressor.o build/Decompressor.o build/Event.o build/StatsdClient.o build/Writer.o \
build/BackoffTimer.o build/DNS.o build/SubModuleLoader.o build/ModuleThread.o build/Logger.o build/TriggerEvent.o
all: $(BINARY) modules
build:
mkdir build
build/%.o: src/%.cpp include/%.h
$(CXX) $(CXXFLAGS) $(DEFINES) $(INC) -c $< -o $@
$(BINARY): build $(DEPS)
$(CXX) $(CXXFLAGS) $(DEFINES) $(INC) -o $(BINARY) main.cpp $(DEPS) $(LDFLAGS)
.PHONY: modules
modules:
$(MAKE) -C modules
.PHONY: test
test: $(BINARY)
$(MAKE) -C test test
.PHONY: clean
clean:
rm -rf $(BINARY) build
$(MAKE) -C modules clean
$(MAKE) -C test clean
doc: include/*.h
doxygen