allow building on linux
This commit is contained in:
parent
f6e5e4be57
commit
e759bd9817
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./jni/Application.mk
|
|
@ -3,8 +3,8 @@ MAIN_LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := libdefault
|
LOCAL_MODULE := libdefault
|
||||||
|
|
||||||
LOCAL_CFLAGS := -Wno-error=format-security -fpermissive
|
LOCAL_CFLAGS := -Wno-error=format-security
|
||||||
LOCAL_CFLAGS += -fno-rtti -fno-exceptions -fPIC
|
LOCAL_CFLAGS += -fno-exceptions -fPIC
|
||||||
|
|
||||||
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)
|
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ LOCAL_SRC_FILES := default.c \
|
||||||
sysinfo.c \
|
sysinfo.c \
|
||||||
hooks/inlineHook.c \
|
hooks/inlineHook.c \
|
||||||
hooks/relocate.c
|
hooks/relocate.c
|
||||||
|
|
||||||
|
|
||||||
LOCAL_LDLIBS := -llog -landroid -lc
|
LOCAL_LDLIBS := -llog -landroid -lc
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
|
APP_ABI := armeabi
|
||||||
APP_ABI := armeabi-v7a
|
APP_ABI := armeabi-v7a
|
||||||
APP_OPTIM := release
|
APP_OPTIM := release
|
||||||
APP_PLATFORM := android-10
|
APP_PLATFORM := android-10
|
||||||
APP_STL := system
|
APP_STL := system
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#include "sysinfo.h"
|
#include "sysinfo.h"
|
||||||
#include "nopsmdrm.h"
|
#include "nopsmdrm.h"
|
||||||
|
@ -36,4 +37,4 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||||
patch_nopsmdrm();
|
patch_nopsmdrm();
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "nopsmdrm.h"
|
#include "nopsmdrm.h"
|
||||||
#include "sysinfo.h"
|
#include "sysinfo.h"
|
||||||
|
|
Loading…
Reference in New Issue