Makefile 1.08 KB
Newer Older
1 2 3 4
include config.mk
include platform.mk

# Targets
5 6
all: info lib modules daemon
install: lib-install modules-install daemon-install
7
check: all tests
8
clean: lib-clean modules-clean daemon-clean tests-clean doc-clean
9 10
doc: doc-html
.PHONY: all install check clean doc
11 12 13 14 15 16 17 18 19

# Options
ifdef COVERAGE
CFLAGS += --coverage
endif

# Dependencies
$(eval $(call find_lib,libknot))
$(eval $(call find_lib,libuv))
20 21
$(eval $(call find_alt,lua,luajit))
$(eval $(call find_alt,lua,lua5.2))
22
$(eval $(call find_alt,lua,lua-5.2))
23
$(eval $(call find_alt,lua,lua))
24
$(eval $(call find_lib,cmocka))
25 26
$(eval $(call find_bin,doxygen))
$(eval $(call find_bin,sphinx-build))
27
$(eval $(call find_bin,gccgo))
28
$(eval $(call find_python))
29 30 31 32 33 34 35 36 37

# Work around luajit on OS X
ifeq ($(PLATFORM), Darwin)
ifneq (,$(findstring luajit, $(lua_LIBS)))
	lua_LIBS += -pagezero_size 10000 -image_base 100000000
endif
endif

CFLAGS += $(libknot_CFLAGS) $(libuv_CFLAGS) $(cmocka_CFLAGS) $(python_CFLAGS) $(lua_CFLAGS)
38 39 40

# Sub-targets
include help.mk
41 42
include lib/lib.mk
include daemon/daemon.mk
43
include modules/modules.mk
44
include tests/tests.mk
45
include doc/doc.mk