From 0a9cd09cc3f10d2f5c5735c10b745dc778c1ee6b Mon Sep 17 00:00:00 2001 From: Aurora Date: Wed, 23 Mar 2016 20:23:27 +0100 Subject: [PATCH] Reorganized folder layout, cleaned Makefile (we do not need Python) --- Makefile | 36 +++++++++---------------- emunand/emuCode.s => patches/emunand.s | 0 reboot/rebootCode.s => patches/reboot.s | 0 3 files changed, 13 insertions(+), 23 deletions(-) rename emunand/emuCode.s => patches/emunand.s (100%) rename reboot/rebootCode.s => patches/reboot.s (100%) diff --git a/Makefile b/Makefile index 0aa5328..b03ce2d 100644 --- a/Makefile +++ b/Makefile @@ -4,25 +4,16 @@ CC := arm-none-eabi-gcc AS := arm-none-eabi-as LD := arm-none-eabi-ld OC := arm-none-eabi-objcopy -OPENSSL := openssl - -PYTHON3 := python -PYTHON_VER_MAJOR := $(word 2, $(subst ., , $(shell python --version 2>&1))) -ifneq ($(PYTHON_VER_MAJOR), 3) - PYTHON3 := py -3 -endif name := AuReiNand dir_source := source -dir_data := data -dir_build := build -dir_mset := CakeHax -dir_out := out -dir_emu := emunand -dir_reboot := reboot -dir_ninjhax := CakeBrah +dir_patches := patches dir_loader := loader +dir_mset := CakeHax +dir_ninjhax := CakeBrah +dir_build := build +dir_out := out ASFLAGS := -mlittle-endian -mcpu=arm946e-s -march=armv5te CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -ffast-math @@ -52,9 +43,12 @@ clean: @rm -rf $(dir_out) $(dir_build) @$(MAKE) -C $(dir_loader) clean +$(dir_out): + @mkdir -p "$(dir_out)/aurei/payloads" + $(dir_out)/$(name).dat: $(dir_build)/main.bin $(dir_out) @$(MAKE) $(FLAGS) -C $(dir_mset) launcher - dd if=$(dir_build)/main.bin of=$@ bs=512 seek=144 + @dd if=$(dir_build)/main.bin of=$@ bs=512 seek=144 $(dir_out)/arm9loaderhax.bin: $(dir_build)/main.bin $(dir_out) @cp -av $(dir_build)/main.bin $@ @@ -65,21 +59,17 @@ $(dir_out)/3ds/$(name): $(dir_out) @mv $(dir_out)/$(name).3dsx $@ @mv $(dir_out)/$(name).smdh $@ -$(dir_out): - @mkdir -p "$(dir_out)/aurei/payloads" - -$(dir_build)/patches.h: $(dir_emu)/emuCode.s $(dir_reboot)/rebootCode.s +$(dir_build)/patches.h: $(dir_patches)/emunand.s $(dir_patches)/reboot.s @mkdir -p "$(dir_build)" @armips $< - @mv emunand.bin $(dir_build) @armips $(word 2,$^) - @mv reboot.bin $(dir_build) - @bin2c -o $@ -n emunand $(dir_build)/emunand.bin -n reboot $(dir_build)/reboot.bin + @mv emunand.bin reboot.bin $(dir_build) + @bin2c -o $@ -n emunand $(dir_build)/emunand.bin -n reboot $(dir_build)/reboot.bin $(dir_build)/loader.h: $(dir_loader)/Makefile @$(MAKE) -C $(dir_loader) @mv $(dir_loader)/loader.bin $(dir_build) - @bin2c -o $@ -n loader $(dir_build)/loader.bin + @bin2c -o $@ -n loader $(dir_build)/loader.bin $(dir_build)/main.bin: $(dir_build)/main.elf $(OC) -S -O binary $< $@ diff --git a/emunand/emuCode.s b/patches/emunand.s similarity index 100% rename from emunand/emuCode.s rename to patches/emunand.s diff --git a/reboot/rebootCode.s b/patches/reboot.s similarity index 100% rename from reboot/rebootCode.s rename to patches/reboot.s