From e9a9e31afa049cfbd7632cea86ef314ee1be5ee8 Mon Sep 17 00:00:00 2001 From: Shaun Inman Date: Sat, 4 Feb 2023 20:19:05 -0500 Subject: [PATCH] moved cores to root (and patches within it) --- .gitignore | 8 ++--- {src/minarch/cores => cores}/makefile | 31 ++++++++++--------- .../minarch => cores}/patches/beetle-vb.patch | 0 {src/minarch => cores}/patches/fceumm.patch | 0 {src/minarch => cores}/patches/gambatte.patch | 0 {src/minarch => cores}/patches/gpsp.patch | 0 .../patches/pcsx_rearmed.patch | 0 .../minarch => cores}/patches/picodrive.patch | 0 {src/minarch => cores}/patches/pokemini.patch | 0 .../patches/snes9x2005_plus.patch | 0 10 files changed, 19 insertions(+), 20 deletions(-) rename {src/minarch/cores => cores}/makefile (61%) rename {src/minarch => cores}/patches/beetle-vb.patch (100%) rename {src/minarch => cores}/patches/fceumm.patch (100%) rename {src/minarch => cores}/patches/gambatte.patch (100%) rename {src/minarch => cores}/patches/gpsp.patch (100%) rename {src/minarch => cores}/patches/pcsx_rearmed.patch (100%) rename {src/minarch => cores}/patches/picodrive.patch (100%) rename {src/minarch => cores}/patches/pokemini.patch (100%) rename {src/minarch => cores}/patches/snes9x2005_plus.patch (100%) diff --git a/.gitignore b/.gitignore index 8929852..96b6ffe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,12 @@ .DS_Store build/ +cores/src +cores/output private/ releases/ *.o *.so *.elf -*.dtb - -# thanks I hate it -src/minarch/cores/* -!src/minarch/cores/makefile +*.dtb \ No newline at end of file diff --git a/src/minarch/cores/makefile b/cores/makefile similarity index 61% rename from src/minarch/cores/makefile rename to cores/makefile index 73ba8b7..09633de 100644 --- a/src/minarch/cores/makefile +++ b/cores/makefile @@ -44,27 +44,28 @@ $1_REPO ?= https://github.com/libretro/$(1) $1_MAKE ?= make $(and $($1_MAKEFILE),-f $($1_MAKEFILE)) platform=$(UNION_PLATFORM) $($(1)_FLAGS) $1_BUILD_PATH ?= $(1) -$(1): - mkdir -p cores - cd cores && git clone $(if $($1_HASH),,--depth 1) --recursive $$($(1)_REPO) $(1) - $(if $($1_HASH),cd $$($1_BUILD_PATH) && git checkout $($1_HASH) && echo $($1_HASH),) +src/$(1): + mkdir -p src + cd src && git clone $(if $($1_HASH),,--depth 1) --recursive $$($(1)_REPO) $(1) + $(if $($1_HASH),cd src/$$($1_BUILD_PATH) && git checkout $($1_HASH) && echo $($1_HASH),) -$(1)/.patched: $(1) - (test ! -f patches/$(1).patch) || (test -f $(1)/.patched) || (cd $(1) && $(PATCH) -p1 < ../../patches/$(1).patch && touch .patched && true) +src/$(1)/.patched: src/$(1) + (test ! -f patches/$(1).patch) || (test -f src/$(1)/.patched) || (cd src/$(1) && $(PATCH) -p1 < ../../patches/$(1).patch && touch .patched && true) -$(1)_libretro.so: $(1)/.patched - cd $$($1_BUILD_PATH) && $$($1_MAKE) $(PROCS) - mv $$($1_BUILD_PATH)/$(if $($(1)_CORE),$($(1)_CORE),$(1)_libretro.so) $(1)_libretro.so +output/$(1)_libretro.so: src/$(1)/.patched + mkdir -p output + cd src/$$($1_BUILD_PATH) && $$($1_MAKE) $(PROCS) + mv src/$$($1_BUILD_PATH)/$(if $($(1)_CORE),$($(1)_CORE),$(1)_libretro.so) output/$(1)_libretro.so -clone-$(1): $(1) +clone-$(1): src/$(1) -patch-$(1): $(1)/.patched +patch-$(1): src/$(1)/.patched clean-$(1): - test ! -d $(1) || cd $$($1_BUILD_PATH) && $$($1_MAKE) clean - rm -rf $(1)_libretro.so + test ! -d src/$(1) || cd src/$$($1_BUILD_PATH) && $$($1_MAKE) clean + rm -rf output/$(1)_libretro.so -$(1): $(1)_libretro.so +$(1): output/$(1)_libretro.so endef @@ -74,4 +75,4 @@ all: cores $(foreach CORE,$(CORES),$(eval $(call TEMPLATE,$(CORE)))) -cores: $(foreach CORE,$(CORES),$(CORE)_libretro.so) \ No newline at end of file +cores: $(foreach CORE,$(CORES),$(CORE)) \ No newline at end of file diff --git a/src/minarch/patches/beetle-vb.patch b/cores/patches/beetle-vb.patch similarity index 100% rename from src/minarch/patches/beetle-vb.patch rename to cores/patches/beetle-vb.patch diff --git a/src/minarch/patches/fceumm.patch b/cores/patches/fceumm.patch similarity index 100% rename from src/minarch/patches/fceumm.patch rename to cores/patches/fceumm.patch diff --git a/src/minarch/patches/gambatte.patch b/cores/patches/gambatte.patch similarity index 100% rename from src/minarch/patches/gambatte.patch rename to cores/patches/gambatte.patch diff --git a/src/minarch/patches/gpsp.patch b/cores/patches/gpsp.patch similarity index 100% rename from src/minarch/patches/gpsp.patch rename to cores/patches/gpsp.patch diff --git a/src/minarch/patches/pcsx_rearmed.patch b/cores/patches/pcsx_rearmed.patch similarity index 100% rename from src/minarch/patches/pcsx_rearmed.patch rename to cores/patches/pcsx_rearmed.patch diff --git a/src/minarch/patches/picodrive.patch b/cores/patches/picodrive.patch similarity index 100% rename from src/minarch/patches/picodrive.patch rename to cores/patches/picodrive.patch diff --git a/src/minarch/patches/pokemini.patch b/cores/patches/pokemini.patch similarity index 100% rename from src/minarch/patches/pokemini.patch rename to cores/patches/pokemini.patch diff --git a/src/minarch/patches/snes9x2005_plus.patch b/cores/patches/snes9x2005_plus.patch similarity index 100% rename from src/minarch/patches/snes9x2005_plus.patch rename to cores/patches/snes9x2005_plus.patch