2020-08-06 14:46:38 +00:00
|
|
|
SUBDIRS = include src utils man
|
2012-01-27 19:00:34 +00:00
|
|
|
|
2017-04-24 17:59:54 +00:00
|
|
|
PKG_CONFIG ?= pkg-config
|
2008-08-19 19:30:36 +00:00
|
|
|
DISABLE_SETRANS ?= n
|
2016-09-29 19:44:10 +00:00
|
|
|
DISABLE_RPM ?= n
|
2016-09-28 16:17:59 +00:00
|
|
|
ANDROID_HOST ?= n
|
2020-10-12 16:07:22 +00:00
|
|
|
LABEL_BACKEND_ANDROID ?= n
|
2016-09-28 16:17:59 +00:00
|
|
|
ifeq ($(ANDROID_HOST),y)
|
|
|
|
override DISABLE_SETRANS=y
|
2016-09-29 18:02:25 +00:00
|
|
|
override DISABLE_BOOL=y
|
2016-09-28 16:17:59 +00:00
|
|
|
endif
|
2012-11-20 15:27:55 +00:00
|
|
|
ifeq ($(DISABLE_RPM),y)
|
2016-09-28 16:00:23 +00:00
|
|
|
DISABLE_FLAGS+= -DDISABLE_RPM
|
2012-11-20 15:27:55 +00:00
|
|
|
endif
|
2008-08-19 19:30:36 +00:00
|
|
|
ifeq ($(DISABLE_SETRANS),y)
|
2016-09-28 16:00:23 +00:00
|
|
|
DISABLE_FLAGS+= -DDISABLE_SETRANS
|
2008-08-19 19:30:36 +00:00
|
|
|
endif
|
2016-09-29 18:02:25 +00:00
|
|
|
ifeq ($(DISABLE_BOOL),y)
|
|
|
|
DISABLE_FLAGS+= -DDISABLE_BOOL
|
|
|
|
endif
|
2020-10-12 14:46:16 +00:00
|
|
|
ifeq ($(DISABLE_X11),y)
|
|
|
|
DISABLE_FLAGS+= -DNO_X_BACKEND
|
|
|
|
endif
|
2020-10-12 16:07:22 +00:00
|
|
|
export DISABLE_SETRANS DISABLE_RPM DISABLE_FLAGS ANDROID_HOST DISABLE_X11 LABEL_BACKEND_ANDROID
|
2008-08-19 19:30:36 +00:00
|
|
|
|
2016-09-15 16:14:33 +00:00
|
|
|
USE_PCRE2 ?= n
|
|
|
|
ifeq ($(USE_PCRE2),y)
|
2017-10-11 08:53:45 +00:00
|
|
|
PCRE_MODULE := libpcre2-8
|
|
|
|
PCRE_CFLAGS := -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8
|
2016-09-15 16:14:33 +00:00
|
|
|
else
|
2017-10-11 08:53:45 +00:00
|
|
|
PCRE_MODULE := libpcre
|
2016-09-15 16:14:33 +00:00
|
|
|
endif
|
2017-10-11 08:53:45 +00:00
|
|
|
PCRE_CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PCRE_MODULE))
|
|
|
|
PCRE_LDLIBS := $(shell $(PKG_CONFIG) --libs $(PCRE_MODULE))
|
|
|
|
export PCRE_MODULE PCRE_CFLAGS PCRE_LDLIBS
|
2016-09-15 16:14:33 +00:00
|
|
|
|
2016-10-17 20:24:08 +00:00
|
|
|
OS := $(shell uname)
|
|
|
|
export OS
|
|
|
|
|
|
|
|
ifeq ($(shell $(CC) -v 2>&1 | grep "clang"),)
|
|
|
|
COMPILER := gcc
|
|
|
|
else
|
|
|
|
COMPILER := clang
|
|
|
|
endif
|
|
|
|
export COMPILER
|
|
|
|
|
2012-01-27 19:00:34 +00:00
|
|
|
all install relabel clean distclean indent:
|
|
|
|
@for subdir in $(SUBDIRS); do \
|
|
|
|
(cd $$subdir && $(MAKE) $@) || exit 1; \
|
|
|
|
done
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
swigify: all
|
2012-01-27 19:00:34 +00:00
|
|
|
$(MAKE) -C src swigify $@
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
pywrap:
|
2012-01-27 19:00:34 +00:00
|
|
|
$(MAKE) -C src pywrap $@
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
rubywrap:
|
2012-01-27 19:00:34 +00:00
|
|
|
$(MAKE) -C src rubywrap $@
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
install-pywrap:
|
2012-01-27 19:00:34 +00:00
|
|
|
$(MAKE) -C src install-pywrap $@
|
2008-08-19 19:30:36 +00:00
|
|
|
|
|
|
|
install-rubywrap:
|
2012-01-27 19:00:34 +00:00
|
|
|
$(MAKE) -C src install-rubywrap $@
|
2008-08-19 19:30:36 +00:00
|
|
|
|
2016-10-26 21:41:54 +00:00
|
|
|
clean-pywrap:
|
|
|
|
$(MAKE) -C src clean-pywrap $@
|
|
|
|
|
|
|
|
clean-rubywrap:
|
|
|
|
$(MAKE) -C src clean-rubywrap $@
|
|
|
|
|
2008-08-19 19:30:36 +00:00
|
|
|
test:
|