allow building on linux

This commit is contained in:
CsvUpdater 2024-04-25 11:56:50 +00:00
parent f6e5e4be57
commit e759bd9817
5 changed files with 12 additions and 6 deletions

2
compile.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
ndk-build NDK_PROJECT_PATH=. NDK_APPLICATION_MK=./jni/Application.mk

View File

@ -3,8 +3,8 @@ MAIN_LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libdefault
LOCAL_CFLAGS := -Wno-error=format-security -fpermissive
LOCAL_CFLAGS += -fno-rtti -fno-exceptions -fPIC
LOCAL_CFLAGS := -Wno-error=format-security
LOCAL_CFLAGS += -fno-exceptions -fPIC
LOCAL_C_INCLUDES += $(MAIN_LOCAL_PATH)
@ -13,8 +13,8 @@ LOCAL_SRC_FILES := default.c \
sysinfo.c \
hooks/inlineHook.c \
hooks/relocate.c
LOCAL_LDLIBS := -llog -landroid -lc
include $(BUILD_SHARED_LIBRARY)
include $(BUILD_SHARED_LIBRARY)

View File

@ -1,4 +1,5 @@
APP_ABI := armeabi
APP_ABI := armeabi-v7a
APP_OPTIM := release
APP_PLATFORM := android-10
APP_STL := system
APP_STL := system

View File

@ -2,6 +2,7 @@
#include <string.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <errno.h>
#include "sysinfo.h"
#include "nopsmdrm.h"
@ -36,4 +37,4 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
patch_nopsmdrm();
return res;
}
}

View File

@ -3,6 +3,8 @@
#include <stdlib.h>
#include <dirent.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include "nopsmdrm.h"
#include "sysinfo.h"