i was building laujit libs for android, but for some reason, ndk makes some strange things and not including sysroot/usr/include/ files into the build. whenever i try to build it, it says that: "fatal error: stdio.h: no such file or directory" or same thing but with string.h, i don't really know why, but minilua.c is using stdio.h the same as files that are giving those errors, but it's compiling without any errors. Android.mk:
# Add LuaJIT prebuilt shared library.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := luajit
LOCAL_SRC_FILES := build/$(TARGET_ARCH_ABI)/lib/libluajit.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/build/$(TARGET_ARCH_ABI)/include
include $(PREBUILT_SHARED_LIBRARY)
Application.mk is empty. build command:
NDKABI=${NDKABI:-21}
TCVER=("${NDK}"/toolchains/aarch64-linux-android-4.*)
NDKP=${TCVER[0]}/prebuilt/${HOST_ARCH}/bin/aarch64-linux-android-
NDKF="--sysroot ${NDK}/platforms/android-${NDKABI}/arch-arm64"
make -C luajit amalg install HOST_CC="gcc" CFLAGS="-O2 -pipe" HOST_CFLAGS="-O2 -pipe -mtune=generic" LDFLAGS="" HOST_LDFLAGS="" TARGET_CFLAGS="${CFLAGS}" TARGET_LDFLAGS="${LDFLAGS}" TARGET_LIBS="${EXTRA_LIBS}" TARGET_SONAME="libluajit.so" INSTALL_SONAME="libluajit.so" CROSS="$NDKP" TARGET_FLAGS="${NDKF}" TARGET_SYS=Linux DESTDIR="${DEST}" PREFIX=
NDK is path into folder with ndk.