diff --git a/libretro/cores/Tuprules.tup b/libretro/cores/Tuprules.tup index 965a11f33..89d7c9559 100644 --- a/libretro/cores/Tuprules.tup +++ b/libretro/cores/Tuprules.tup @@ -1,12 +1,42 @@ -!libretro_cc = |> ^ CC %f^ $(CC) `pkg-config --cflags $(CORE_PKGS)` $(CFLAGS) $(INCFLAGS) -c %f -o %o |> %f.o -!libretro_cxx = |> ^ CXX %f^ $(CXX) `pkg-config --cflags $(CORE_PKGS)` $(CFLAGS) $(CXXFLAGS) $(INCFLAGS) -c %f -o %o |> %f.o +!libretro_cc = |> ^ CC %f^ \ + $(CC) \ + `pkg-config --cflags $(CORE_PKGS)` \ + $(CFLAGS) $(INCFLAGS) \ + `pkg-config --cflags genode-lib` \ + -c %f -o %o \ +|> %f.o -!libretro_core_link = |> ^o LD %d^ $(LD) -shared --version-script=$(LINK_T) %f -o %o `pkg-config --libs $(CORE_PKGS)` $(LDFLAGS) |> libretro.so +!libretro_cxx = |> ^ CXX %f^ \ + $(CXX) \ + `pkg-config --cflags $(CORE_PKGS)` \ + $(CFLAGS) $(CXXFLAGS) $(INCFLAGS) \ + `pkg-config --cflags genode-lib` \ + -c %f -o %o \ +|> %f.o -!publish_core = | libretro.so |> ^ STRIP %o^ strip -o %o %f |> $(DEPOT_BIN_DIR)/libretro-$(TARGET_NAME)/@(DEPOT_VERSION)/%b -!publish_core_archives = |> ^ varse %d archives^ tup varsed %f %o |> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/archives -!publish_core_runtime = |> ^ validate %d runtime^ xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o |> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/ +!libretro_core_link = |> ^o LD %d^ \ + $(LD) %f -o %o \ + -shared --version-script=$(LINK_T) $(NO_UNDEFINED) \ + $(LDFLAGS) \ + `pkg-config --libs $(CORE_PKGS)` \ + `pkg-config --libs genode-lib` \ +|> libretro.so + +!publish_core = | libretro.so |> ^ STRIP %o^ \ + strip -o %o %f \ +|> $(DEPOT_BIN_DIR)/libretro-$(TARGET_NAME)/@(DEPOT_VERSION)/%b + +!publish_core_archives = |> ^ varse %d archives^ \ + tup varsed %f %o ; \ + echo @(DEPOT_USER)/src/libretro-$(TARGET_NAME)/@(DEPOT_VERSION) >> %o \ +|> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/archives + +!publish_core_runtime = |> ^ validate %d runtime^ \ + xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o \ +|> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/ + +!publish_core_metadata = |> ^ CP %o^ cp %f %o |> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/%b LINK_T = $(TUP_CWD)/link.T -CORE_PKGS += genode-lib CFLAGS += -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 +NO_UNDEFINED = --no-undefined