diff --git a/src/Makefile b/src/Makefile index 6c26b35..9d60f94 100644 --- a/src/Makefile +++ b/src/Makefile @@ -10,12 +10,9 @@ OBJECTS += xxd-libcheckra1nhelper.dylib.o endif endif -ifeq (,$(findstring xxd-libcheckra1nhelper.dylib.o, $(CFLAGS))) -ifeq ($(TARGET_OS),Darwin) -ifeq ($(DEV_BUILD),1) +ifeq ($(FORCE_HELPER),1) OBJECTS += xxd-libcheckra1nhelper.dylib.o -endif -endif +CFLAGS += -DFORCE_HELPER endif ifneq ($(NO_RAMDISK),1) diff --git a/src/exec_checkra1n.c b/src/exec_checkra1n.c index 4bcbc4a..b19e741 100644 --- a/src/exec_checkra1n.c +++ b/src/exec_checkra1n.c @@ -59,7 +59,7 @@ int exec_checkra1n() { unlink(checkra1n_path); return -1; } -#if defined(__APPLE__) && (TARGET_OS_IPHONE || defined(DEV_BUILD)) +#if defined(__APPLE__) && defined(__arm64__) && (TARGET_OS_IPHONE || defined(FORCE_HELPER)) char* libcheckra1nhelper_dylib_path = NULL; { struct utsname name; @@ -123,7 +123,7 @@ checkra1n_exec: {}; free(checkra1n_path); checkra1n_path = NULL; } -#if defined(__APPLE__) && (TARGET_OS_IPHONE || defined(DEV_BUILD)) +#if defined(__APPLE__) && defined(__arm64__) && (TARGET_OS_IPHONE || defined(FORCE_HELPER)) if (libcheckra1nhelper_dylib_path != NULL) { unlink(libcheckra1nhelper_dylib_path); unsetenv("DYLD_INSERT_LIBRARIES");