diff -uNr haproxy-1.9.5/Makefile haproxy-1.9.5.mod/Makefile --- haproxy-1.9.5/Makefile 2019-03-19 15:40:44.000000000 +0200 +++ haproxy-1.9.5.mod/Makefile 2019-03-27 15:36:22.262501763 +0200 @@ -127,10 +127,10 @@ #### Installation options. DESTDIR = -PREFIX = /usr/local -SBINDIR = $(PREFIX)/sbin +PREFIX ?= /usr/local +SBINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man -DOCDIR = $(PREFIX)/doc/haproxy +DOCDIR = $(PREFIX)/share/doc/haproxy #### TARGET system # Use TARGET= to optimize for a specifc target OS among the @@ -154,7 +154,7 @@ #### Toolchain options. # GCC is normally used both for compiling and linking. -CC = gcc +CC ?= gcc LD = $(CC) #### Debug flags (typically "-g"). @@ -264,13 +264,13 @@ # These CFLAGS contain general optimization options, CPU-specific optimizations # and debug flags. They may be overridden by some distributions which prefer to # set all of them at once instead of playing with the CPU and DEBUG variables. -CFLAGS = $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS) $(SPEC_CFLAGS) +CFLAGS = $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS) $(SPEC_CFLAGS) -I@TERMUX_PREFIX@/include #### Common LDFLAGS # These LDFLAGS are used as the first "ld" options, regardless of any library # path or any other option. They may be changed to add any linker-specific # option at the beginning of the ld command line. -LDFLAGS = $(ARCH_FLAGS) -g +LDFLAGS = $(ARCH_FLAGS) -g -L@TERMUX_PREFIX@/lib #### Target system options # Depending on the target platform, some options are set, as well as some @@ -692,7 +692,7 @@ ifeq ($(LUA_LIB_NAME),) $(error unable to automatically detect the Lua library name, you can enforce its name with LUA_LIB_NAME= (where can be lua5.3, lua53, lua, ...)) endif -LUA_INC := $(firstword $(foreach lib,lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/"))) +LUA_INC := $(firstword $(foreach lib,lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"@TERMUX_PREFIX@/include/"))) ifneq ($(LUA_INC),) OPTIONS_CFLAGS += -I$(LUA_INC) endif @@ -774,12 +774,8 @@ # Forcing PCREDIR to an empty string will let the compiler use the default # locations. -PCRE_CONFIG := pcre-config -PCREDIR := $(shell $(PCRE_CONFIG) --prefix 2>/dev/null || echo /usr/local) -ifneq ($(PCREDIR),) -PCRE_INC := $(PCREDIR)/include -PCRE_LIB := $(PCREDIR)/lib -endif +PCRE_INC := @TERMUX_PREFIX@/include +PCRE_LIB := @TERMUX_PREFIX@/lib ifeq ($(USE_STATIC_PCRE),) # dynamic PCRE