From e8a55e2d8c977750225468619e4020f434e79618 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 3 Mar 2019 12:25:05 +0100 Subject: [PATCH] Add Libretro sample cores The Basic and Pascal cores are disabled. --- .gitmodules | 4 +- index/Tupfile | 9 +- libretro/cores/button_test/Tupfile | 10 -- libretro/cores/button_test/archives | 4 - libretro/cores/fceumm/Tupfile | 15 -- libretro/cores/fceumm/Tuprules.tup | 28 ++++ libretro/cores/fceumm/core | 1 - libretro/cores/fceumm/upstream | 1 + libretro/cores/samples | 1 - libretro/cores/samples/Tuprules.tup | 146 ++++++++++++++++++ libretro/cores/samples/audio.runtime | 43 ++++++ .../{testgl/runtime => samples/midi.runtime} | 8 +- .../runtime => samples/noaudio.runtime} | 8 +- .../archives => samples/simple.archives} | 2 +- libretro/cores/samples/simple.runtime | 40 +++++ libretro/cores/samples/testgl.archives | 7 + libretro/cores/samples/testgl.runtime | 28 ++++ libretro/cores/samples/upstream | 1 + libretro/cores/testgl/Tupfile | 18 --- 19 files changed, 315 insertions(+), 59 deletions(-) delete mode 100644 libretro/cores/button_test/Tupfile delete mode 100644 libretro/cores/button_test/archives delete mode 100644 libretro/cores/fceumm/Tupfile create mode 100644 libretro/cores/fceumm/Tuprules.tup delete mode 160000 libretro/cores/fceumm/core create mode 160000 libretro/cores/fceumm/upstream delete mode 160000 libretro/cores/samples create mode 100644 libretro/cores/samples/Tuprules.tup create mode 100644 libretro/cores/samples/audio.runtime rename libretro/cores/{testgl/runtime => samples/midi.runtime} (71%) rename libretro/cores/{button_test/runtime => samples/noaudio.runtime} (86%) rename libretro/cores/{testgl/archives => samples/simple.archives} (70%) create mode 100644 libretro/cores/samples/simple.runtime create mode 100644 libretro/cores/samples/testgl.archives create mode 100644 libretro/cores/samples/testgl.runtime create mode 160000 libretro/cores/samples/upstream delete mode 100644 libretro/cores/testgl/Tupfile diff --git a/.gitmodules b/.gitmodules index ee55342ce..d21e43c76 100644 --- a/.gitmodules +++ b/.gitmodules @@ -29,7 +29,7 @@ path = libretro/cores/4do/core url = https://github.com/libretro/4do-libretro [submodule "libretro/cores/fceumm/core"] - path = libretro/cores/fceumm/core + path = libretro/cores/fceumm/upstream url = https://github.com/libretro/libretro-fceumm [submodule "libretro/cores/mgba/core"] path = libretro/cores/mgba/core @@ -47,7 +47,7 @@ path = libretro/cores/tyrquake/core url = https://github.com/libretro/tyrquake [submodule "libretro/cores/samples"] - path = libretro/cores/samples + path = libretro/cores/samples/upstream url = https://github.com/libretro/libretro-samples [submodule "libretro/cores/dosbox/core"] path = libretro/cores/dosbox/core diff --git a/index/Tupfile b/index/Tupfile index e2aeaf774..318e33ede 100644 --- a/index/Tupfile +++ b/index/Tupfile @@ -9,8 +9,15 @@ DEPOT_INDEX_FILE = $(DEPOT_DIR)/index/@(SCULPT_VERSION) ifneq (@(DEPOT_USER),local) : index.xml |> tup varsed %f - | xmllint - > %o |> $(DEPOT_INDEX_FILE) {index} else -: $(DEPOT_DIR)/ |> ^ generate index^ \ +: $(DEPOT_DIR)/ $(DEPOT_DIR)/ |> ^ generate index^ \ echo '' > %o; \ + echo ' ' >> %o; \ + echo % | tr ' ' '\n' | sort |\ + sed \ + -e 's|\.\./depot/| |' \ + - >> %o; \ + echo ' ' >> %o; \ echo % | tr ' ' '\n' | sort |\ sed \ -e 's|\.\./depot/| !libretro_cc |> {libretro_objs} +: foreach $(SOURCES_CXX) |> !libretro_cxx |> {libretro_objs} + +: {libretro_objs} |> !libretro_core_link |> {core} +: {core} |> !publish_core |> + +: $(TUP_CWD)/archives |> !publish_core_archives |> {package} +: $(TUP_CWD)/runtime |> !publish_core_runtime |> {package} + +ifdef DEPOT_KEY +: {binary} |> !depot_bin_tarball |> {tarballs} +: {package} |> !depot_pkg_tarball |> {tarballs} +: foreach {tarballs} |> !public_signature |> +endif diff --git a/libretro/cores/fceumm/core b/libretro/cores/fceumm/core deleted file mode 160000 index b5190048b..000000000 --- a/libretro/cores/fceumm/core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b5190048b7250d4d73f712ed26182eee8cc979c3 diff --git a/libretro/cores/fceumm/upstream b/libretro/cores/fceumm/upstream new file mode 160000 index 000000000..f8dd9953e --- /dev/null +++ b/libretro/cores/fceumm/upstream @@ -0,0 +1 @@ +Subproject commit f8dd9953e44063691050dc71e75b0916083b87de diff --git a/libretro/cores/samples b/libretro/cores/samples deleted file mode 160000 index 8452cd948..000000000 --- a/libretro/cores/samples +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8452cd94833eea3c3dea870f6d8c881452f4a10b diff --git a/libretro/cores/samples/Tuprules.tup b/libretro/cores/samples/Tuprules.tup new file mode 100644 index 000000000..be469b106 --- /dev/null +++ b/libretro/cores/samples/Tuprules.tup @@ -0,0 +1,146 @@ +CORE_PKGS += libc libm +LDFLAGS += --no-undefined +CFLAGS += -O3 -Wall -pedantic -std=gnu99 + +ifeq ($(TARGET_NAME),testaudio_callback) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/audio.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testaudio_no_callback) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/audio.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testaudio_playback_wav) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/audio.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),button_test) + CFLAGS += -Ilibretro-common/include + SOURCES_C += libretro.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +#ifeq ($(TARGET_NAME),freebasic) +# : fbastest.bas |> fbc -dll %f -x %o |> libretro.so {core} +# : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} +# : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +#endif + +#ifeq ($(TARGET_NAME),pascal_pong) +# : pong.pas |> fpc -o%o %f |> libretro.so {core} +# : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} +# : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +#endif + +ifeq ($(TARGET_NAME),midi_test) + SOURCES_C += libretro.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/midi.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),test) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),cruzes) + SOURCES_C += cruzes.c ttf2c.c + # : obj/Carlito-Regular.ttf |> ttf2c 24 font24 %f %o |> font24.h + # : obj/Carlito-Regular.ttf |> ttf2c 16 font16 %f %o |> font16.h + # : obj/Carlito-Regular.ttf |> ttf2c 10 font10 %f %o |> font10.h + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),advanced_tests) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/audio.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testgl_compute_shaders) + CORE_PKGS += mesa + CFLAGS += -Igl -DNDEBUG -fPIC -DHAVE_ZIP_DEFLATE + CXXFLAGS += -std=gnu++11 + SOURCES_CXX += libretro/libretro.cpp + SOURCES_CXX += gl/*.cpp + SOURCES_CXX += app/boxes.cpp + SOURCES_C += glsym/rglgen.c + SOURCES_C += glsym/glsym_gl.c + + : $(TUP_CWD)/testgl.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/testgl.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testgl_ff) + CORE_PKGS += mesa + CFLAGS += + SOURCES_C += libretro_gl_ff_test.c glsym/rglgen.c glsym/glsym_gl.c + : $(TUP_CWD)/testgl.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/testgl.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testgl) + CORE_PKGS += mesa + CFLAGS += + SOURCES_C += libretro_gl_test.c + SOURCES_C += glsym/rglgen.c + SOURCES_C += glsym/glsym_gl.c + + : $(TUP_CWD)/testgl.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/testgl.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testsw) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testsw_vram) + CFLAGS += -I../../libretro-common/include + SOURCES_C += libretro-test.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testvulkan_async_compute) + CFLAGS += -I../../libretro-common/include -Iinclude + SOURCES_C += libretro-test.c vulkan_symbol_wrapper.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +ifeq ($(TARGET_NAME),testvulkan) + CFLAGS += -I../../libretro-common/include -Iinclude + SOURCES_C += libretro-test.c vulkan_symbol_wrapper.c + : $(TUP_CWD)/simple.archives |> !publish_core_archives |> {package} + : $(TUP_CWD)/simple.runtime |> !publish_core_runtime |> {package} +endif + +: foreach $(SOURCES_C) |> !libretro_cc |> {libretro_objs} + +: {libretro_objs} |> !libretro_core_link |> {core} +: {core} |> !publish_core |> + +: README.md |> !publish_core_metadata |> {package} + +ifdef DEPOT_KEY +: {binary} |> !depot_bin_tarball |> {tarballs} +: {package} |> !depot_pkg_tarball |> {tarballs} +: foreach {tarballs} |> !public_signature |> +endif diff --git a/libretro/cores/samples/audio.runtime b/libretro/cores/samples/audio.runtime new file mode 100644 index 000000000..aaaa13548 --- /dev/null +++ b/libretro/cores/samples/audio.runtime @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libretro/cores/testgl/runtime b/libretro/cores/samples/midi.runtime similarity index 71% rename from libretro/cores/testgl/runtime rename to libretro/cores/samples/midi.runtime index 69f2e30ac..0fd923dd7 100644 --- a/libretro/cores/testgl/runtime +++ b/libretro/cores/samples/midi.runtime @@ -1,8 +1,7 @@ - + - @@ -11,15 +10,18 @@ + + + - + diff --git a/libretro/cores/button_test/runtime b/libretro/cores/samples/noaudio.runtime similarity index 86% rename from libretro/cores/button_test/runtime rename to libretro/cores/samples/noaudio.runtime index 2adc275fd..eb30f33b5 100644 --- a/libretro/cores/button_test/runtime +++ b/libretro/cores/samples/noaudio.runtime @@ -1,13 +1,15 @@ - + - + + + - + diff --git a/libretro/cores/testgl/archives b/libretro/cores/samples/simple.archives similarity index 70% rename from libretro/cores/testgl/archives rename to libretro/cores/samples/simple.archives index 610b22e7f..7401911c7 100644 --- a/libretro/cores/testgl/archives +++ b/libretro/cores/samples/simple.archives @@ -1,4 +1,4 @@ @SDK_USER@/src/vfs/@SDK_VERSION@ @SDK_USER@/src/libc/@SDK_VERSION@ +@SDK_USER@/src/stdcxx/@SDK_VERSION@ @DEPOT_USER@/src/retro_frontend/@DEPOT_VERSION@ -@DEPOT_USER@/src/libretro-testgl/@DEPOT_VERSION@ diff --git a/libretro/cores/samples/simple.runtime b/libretro/cores/samples/simple.runtime new file mode 100644 index 000000000..eb30f33b5 --- /dev/null +++ b/libretro/cores/samples/simple.runtime @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libretro/cores/samples/testgl.archives b/libretro/cores/samples/testgl.archives new file mode 100644 index 000000000..d13e52f49 --- /dev/null +++ b/libretro/cores/samples/testgl.archives @@ -0,0 +1,7 @@ +@SDK_USER@/src/vfs/@SDK_VERSION@ +@SDK_USER@/src/libc/@SDK_VERSION@ +@SDK_USER@/src/stdcxx/@SDK_VERSION@ +@PUBLIC_SRC_EXPAT@ +@PUBLIC_SRC_MESA@ +@DEPOT_USER@/src/retro_frontend/@DEPOT_VERSION@ +@DEPOT_USER@/src/libretro-testgl/@DEPOT_VERSION@ diff --git a/libretro/cores/samples/testgl.runtime b/libretro/cores/samples/testgl.runtime new file mode 100644 index 000000000..6b177b752 --- /dev/null +++ b/libretro/cores/samples/testgl.runtime @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libretro/cores/samples/upstream b/libretro/cores/samples/upstream new file mode 160000 index 000000000..fd6547e86 --- /dev/null +++ b/libretro/cores/samples/upstream @@ -0,0 +1 @@ +Subproject commit fd6547e86fae1bd35606f19ddc8caa00596d509d diff --git a/libretro/cores/testgl/Tupfile b/libretro/cores/testgl/Tupfile deleted file mode 100644 index 243984366..000000000 --- a/libretro/cores/testgl/Tupfile +++ /dev/null @@ -1,18 +0,0 @@ -ifdef BUILD_BROKEN - -include_rules - -CFLAGS += -O3 -std=gnu99 -Wall -pedantic - -CORE_DIR = ../samples/video/opengl/libretro_test_gl_shaders - -CFLAGS += -I/home/repo/genode/contrib/mesa-6835d67506c800140e54b384baa5b070c8e48aeb/include - -SOURCES_C = \ - $(CORE_DIR)/libretro_gl_test.c \ - $(CORE_DIR)/glsym/rglgen.c \ - $(CORE_DIR)/glsym/glsym_gl.c \ - -include $(LIBRETRO_CORE_INCLUDE) - -endif