daemon.mk 686 Bytes
Newer Older
Marek Vavruša's avatar
Marek Vavruša committed
1 2 3 4
kresolved_SOURCES := \
	daemon/layer/query.c \
	daemon/udp.c         \
	daemon/tcp.c         \
5
	daemon/engine.c      \
Marek Vavruša's avatar
Marek Vavruša committed
6 7 8
	daemon/worker.c      \
	daemon/main.c

9 10 11 12 13 14
# Embed resources
daemon/engine.o: daemon/lua/init.inc
%.inc: %.lua
	@$(call quiet,XXD,$<) -i < $< > $@
	@echo ', 0x00' >> $@

Marek Vavruša's avatar
Marek Vavruša committed
15
# Dependencies
16 17
kresolved_DEPEND := $(libkresolve)
kresolved_LIBS := $(libkresolve_TARGET) $(libknot_LIBS) $(libuv_LIBS) $(lua_LIBS)
Marek Vavruša's avatar
Marek Vavruša committed
18 19

# Make binary
20
ifeq ($(HAS_lua)|$(HAS_libuv), yes|yes)
21
$(eval $(call make_bin,kresolved,daemon))
22
endif
23 24

# Targets
25
daemon: $(kresolved)
26 27
daemon-install: kresolved-install
daemon-clean: kresolved-clean
28 29
	@$(RM) daemon/lua/*.inc

30
.PHONY: daemon daemon-install daemon-clean