makefile: Add support to build under Android termux
This commit is contained in:
parent
d090436c78
commit
6a99ac81c6
1 changed files with 13 additions and 2 deletions
15
makefile
15
makefile
|
@ -230,7 +230,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
OS_CCDEFS += -DSIM_ASYNCH_IO
|
OS_CCDEFS += -DSIM_ASYNCH_IO
|
||||||
endif
|
endif
|
||||||
OS_LDFLAGS = -lm
|
OS_LDFLAGS = -lm
|
||||||
else # Non-Android Builds
|
else # Non-Android (or Native Android) Builds
|
||||||
ifeq (,$(INCLUDES)$(LIBRARIES))
|
ifeq (,$(INCLUDES)$(LIBRARIES))
|
||||||
INCPATH:=$(shell LANG=C; $(GCC) -x c -v -E /dev/null 2>&1 | grep -A 10 '> search starts here' | grep '^ ' | tr -d '\n')
|
INCPATH:=$(shell LANG=C; $(GCC) -x c -v -E /dev/null 2>&1 | grep -A 10 '> search starts here' | grep '^ ' | tr -d '\n')
|
||||||
ifeq (,$(INCPATH))
|
ifeq (,$(INCPATH))
|
||||||
|
@ -288,7 +288,18 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
else
|
else
|
||||||
ifeq (Linux,$(OSTYPE))
|
ifeq (Linux,$(OSTYPE))
|
||||||
ifneq (lib,$(findstring lib,$(UNSUPPORTED_BUILD)))
|
ifneq (lib,$(findstring lib,$(UNSUPPORTED_BUILD)))
|
||||||
LIBPATH := $(sort $(foreach lib,$(shell /sbin/ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib))))
|
ifneq (,$(shell if $(TEST) -d /system/lib; then echo systemlib; fi))
|
||||||
|
ifneq (,$(shell uname -a | grep 'aarch64 Android'))
|
||||||
|
OS_CCDEFS += -DCANT_USE_TERMIOS_TCSAFLUSH
|
||||||
|
endif
|
||||||
|
LIBPATH += /system/lib
|
||||||
|
endif
|
||||||
|
ifneq (,$(shell if $(TEST) -d /data/data/com.termux/files/usr/lib; then echo termuxlib; fi))
|
||||||
|
LIBPATH += /data/data/com.termux/files/usr/lib
|
||||||
|
endif
|
||||||
|
ifneq (,$(shell which ldconfig))
|
||||||
|
LIBPATH := $(sort $(foreach lib,$(shell ldconfig -p | grep ' => /' | sed 's/^.* => //'),$(dir $(lib))))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
LIBEXT = so
|
LIBEXT = so
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue