Commit d1343243 authored by Baptiste Jonglez's avatar Baptiste Jonglez
Browse files

Fix build dependencies and simplify Makefile

parent 2c814d3e
......@@ -4,25 +4,24 @@ 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
DEPS = $(OBJECTS:.o=.d)
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 $(OBJECTS)
$(CXX) -MMD -MP -c $(CXXFLAGS) -o $@ $<
%.o: src/messages.h src/messages.mes
$(CXX) -c $(CXXFLAGS) -o $@ $<
# Compile messages (for logging)
src/messages.h src/ s-messages
s-messages: src/messages.mes
# Both .h and .cc are generated by kea-msg-compiler, but this
# can't be expressed directly in a Makefile.
src/messages.h: src/
src/ src/messages.mes
$(KEA_MSG_COMPILER) -d src/ $<
touch $@
rm -f src/*.o
rm -f src/messages.h src/ s-messages
rm -f src/messages.h src/
rm -f
-include $(DEPS)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment