-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
24 lines (18 loc) · 817 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
KEA_MSG_COMPILER ?= kea-msg-compiler
KEA_INCLUDE ?= /usr/include/kea
KEA_LIB ?= /usr/lib
OBJECTS = src/messages.o src/logger.o src/load.o src/runscript.o src/callouts.o src/version.o
CXXFLAGS = -I $(KEA_INCLUDE) -fPIC -Wno-deprecated -std=c++11
LDFLAGS = -L $(KEA_LIB) -shared -lkea-dhcpsrv -lkea-dhcp++ -lkea-hooks -lkea-log -lkea-util -lkea-exceptions
kea-hook-runscript.so: $(OBJECTS)
$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(OBJECTS)
%.o: %.cc
$(CXX) -c $(CXXFLAGS) -o $@ $<
# Compile logging messages, generates messages.h and messages.cc.
# Only needs to be done when changing messages.mes.
# You need to build kea with `./configure --enable-generate-messages` to obtain `kea-msg-compiler`
build-messages: src/messages.mes
$(KEA_MSG_COMPILER) -d src/ $<
clean:
rm -f src/*.o
rm -f kea-hook-runscript.so