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