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