From: chaoskagami Date: Tue, 10 Jan 2017 14:07:01 +0000 (-0500) Subject: Fix structure X-Git-Tag: v0.3.1~29 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=5e32333ad57807848b108d772d99ab1b5d3a5ae9;p=corbenik%2Fcorbenik.git Fix structure --- diff --git a/Makefile.am b/Makefile.am index ae8b1eb..2af932a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ -SUBDIRS = include host external source patch loader bits +SUBDIRS = include host external boot patch loader bits ACLOCAL_AMFLAGS = -I m4 -source: include host external patch +boot: include host external patch external: include host @@ -12,7 +12,7 @@ install: @echo "Please don't call the install target directly, it doesn't work." @exit 1 -all-local: external loader source bits +all-local: external loader boot bits mkdir -p out mkdir -p out@prefix@ mkdir -p out@libdir@/module @@ -27,10 +27,10 @@ all-local: external loader source bits mkdir -p out@libexecdir@ mkdir -p out@sysconfdir@ mkdir -p out@localstatedir@ - cp source/corbenik.bin out/arm9loaderhax.bin - cp source/corbenik out/corbenik.elf - cp external/loader/loader.cxi out@libdir@/module/native/loader.cxi - cp external/bits/*.bin out@libexecdir@/ + cp boot/corbenik.bin out/arm9loaderhax.bin + cp boot/corbenik out/corbenik.elf + cp loader/loader.cxi out@libdir@/module/native/loader.cxi + cp bits/*.bin out@libexecdir@/ cp host/termfont.bin out@datarootdir@/ cp patch/*.vco out@sbindir@ cp external/contrib_patch/*.vco out@bindir@ diff --git a/boot/interpreter.c b/boot/interpreter.c index ff418bb..4dd504c 100644 --- a/boot/interpreter.c +++ b/boot/interpreter.c @@ -5,6 +5,22 @@ #ifndef LOADER #include #else + #ifndef PATH_MAX + #define PATH_MAX 255 + #define _MAX_LFN 255 + #endif + + #include <3ds.h> + #include + #include + #include + + #include "patcher.h" + #include "memory.h" + #include "logger.h" + + #include + #include #include #endif diff --git a/loader/Makefile b/loader/Makefile index 440f3a1..e3dbd85 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -47,7 +47,7 @@ CFLAGS := -flto -Wall -Os -mword-relocations $(ERROR) \ -fomit-frame-pointer -ffunction-sections -fdata-sections -fshort-wchar \ $(ARCH) -CFLAGS += $(INCLUDE) -DARM11 -D_3DS -DLOADER=1 -I../../../include $(PATHARGS) +CFLAGS += $(INCLUDE) -DARM11 -D_3DS -DLOADER=1 -I../../include $(PATHARGS) CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu99 @@ -60,7 +60,7 @@ LIBS := -lctru # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- -LIBDIRS := $(CURDIR)/../ctrulib/libctru +LIBDIRS := $(CURDIR)/../external/ctrulib/libctru #--------------------------------------------------------------------------------- diff --git a/loader/source/interp.c b/loader/source/interp.c deleted file mode 100644 index bf30558..0000000 --- a/loader/source/interp.c +++ /dev/null @@ -1,20 +0,0 @@ -// This is a thin shim used to set the right parameters and include the interpreter from toplevel code. -#include <3ds.h> -#include -#include "patcher.h" -#include -#include -#include -#include "memory.h" -#include "logger.h" - -#ifndef PATH_MAX -#define PATH_MAX 255 -#define _MAX_LFN 255 -#endif -#include -#include - -// Yes, we're including a C file. Problem? -#include "../../../source/interpreter.c" - diff --git a/loader/source/interpreter.c b/loader/source/interpreter.c new file mode 120000 index 0000000..4c1759b --- /dev/null +++ b/loader/source/interpreter.c @@ -0,0 +1 @@ +../../boot/interpreter.c \ No newline at end of file