• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1SUBDIRS = include src utils man
2
3PKG_CONFIG ?= pkg-config
4DISABLE_SETRANS ?= n
5DISABLE_RPM ?= n
6ANDROID_HOST ?= n
7LABEL_BACKEND_ANDROID ?= n
8ifeq ($(ANDROID_HOST),y)
9	override DISABLE_SETRANS=y
10	override DISABLE_BOOL=y
11endif
12ifeq ($(DISABLE_RPM),y)
13	DISABLE_FLAGS+= -DDISABLE_RPM
14endif
15ifeq ($(DISABLE_SETRANS),y)
16	DISABLE_FLAGS+= -DDISABLE_SETRANS
17endif
18ifeq ($(DISABLE_BOOL),y)
19	DISABLE_FLAGS+= -DDISABLE_BOOL
20endif
21ifeq ($(DISABLE_X11),y)
22	DISABLE_FLAGS+= -DNO_X_BACKEND
23endif
24export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST DISABLE_X11 LABEL_BACKEND_ANDROID
25
26USE_PCRE2 ?= n
27ifeq ($(USE_PCRE2),y)
28	PCRE_MODULE := libpcre2-8
29	PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8
30else
31	PCRE_MODULE := libpcre
32endif
33PCRE_CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PCRE_MODULE))
34PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs $(PCRE_MODULE))
35export PCRE_MODULE PCRE_CFLAGS PCRE_LDLIBS
36
37OS := $(shell uname)
38export OS
39
40ifeq ($(shell $(CC) -v 2>&1 | grep "clang"),)
41COMPILER := gcc
42else
43COMPILER := clang
44endif
45export COMPILER
46
47all install relabel clean distclean indent:
48	@for subdir in $(SUBDIRS); do \
49		(cd $$subdir && $(MAKE) $@) || exit 1; \
50	done
51
52swigify: all
53	$(MAKE) -C src $@
54
55pywrap:
56	$(MAKE) -C src $@
57
58rubywrap:
59	$(MAKE) -C src $@
60
61install-pywrap:
62	$(MAKE) -C src $@
63
64install-rubywrap:
65	$(MAKE) -C src $@
66
67clean-pywrap:
68	$(MAKE) -C src $@
69
70clean-rubywrap:
71	$(MAKE) -C src $@
72
73test:
74