]> Chaos Git - corbenik/corbenik.git/commitdiff
Fix structure
authorchaoskagami <chaos.kagami@gmail.com>
Tue, 10 Jan 2017 14:07:01 +0000 (09:07 -0500)
committerchaoskagami <chaos.kagami@gmail.com>
Tue, 10 Jan 2017 14:07:01 +0000 (09:07 -0500)
Makefile.am
boot/interpreter.c
loader/Makefile
loader/source/interp.c [deleted file]
loader/source/interpreter.c [new symlink]

index ae8b1eb0e445cc339683f343007201ff31eb01aa..2af932acc3660070d663fce689acd4e3258ac19c 100644 (file)
@@ -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@
index ff418bbfd5269f88f729ef4eaad4aea765c0735e..4dd504cfb8f5fbe4d108dffd329306c23d05b75c 100644 (file)
@@ -5,6 +5,22 @@
 #ifndef LOADER
   #include <common.h>
 #else
+  #ifndef PATH_MAX
+    #define PATH_MAX 255
+    #define _MAX_LFN 255
+  #endif
+
+  #include <3ds.h>
+  #include <string.h>
+  #include <stdio.h>
+  #include <stdlib.h>
+
+  #include "patcher.h"
+  #include "memory.h"
+  #include "logger.h"
+
+  #include <option.h>
+  #include <structures.h>
   #include <string.h>
 #endif
 
index 440f3a1cb8e24a6c070fbda566283e0d886a6a14..e3dbd85e16261fbd22822d9b4a9d96a1c40dad7c 100644 (file)
@@ -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 (file)
index bf30558..0000000
+++ /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 <stdlib.h>
-#include "patcher.h"
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "memory.h"
-#include "logger.h"
-
-#ifndef PATH_MAX
-#define PATH_MAX 255
-#define _MAX_LFN 255
-#endif
-#include <option.h>
-#include <structures.h>
-
-// 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 (symlink)
index 0000000..4c1759b
--- /dev/null
@@ -0,0 +1 @@
+../../boot/interpreter.c
\ No newline at end of file