moved cores to root (and patches within it)

This commit is contained in:
Shaun Inman 2023-02-04 20:19:05 -05:00
parent 49a2027e8f
commit e9a9e31afa
10 changed files with 19 additions and 20 deletions

6
.gitignore vendored
View file

@ -1,6 +1,8 @@
.DS_Store
build/
cores/src
cores/output
private/
releases/
@ -8,7 +10,3 @@ releases/
*.so
*.elf
*.dtb
# thanks I hate it
src/minarch/cores/*
!src/minarch/cores/makefile

View file

@ -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)
cores: $(foreach CORE,$(CORES),$(CORE))