libretro-genode/libretro/cores/Tuprules.tup

72 lines
2.2 KiB
Plaintext
Raw Normal View History

2019-03-24 20:04:00 +01:00
DEPOT_NAME = $(TARGET_NAME)
!raw = |> ^ COLLECT %o^ \
echo local/raw/$(TARGET_NAME)/$(RAW_VERSION) > %o \
|> $(DEPOT_RAW_DIR)/$(DEPOT_NAME)/current/_ARCHIVES $(DEPOT_DIR)/<raw-archives>
!bin = |> ^ COLLECT %o^ \
echo $(REMOTE_DEPENDS) local/src/libretro-$(DEPOT_NAME)/$(BIN_VERSION) | tr ' ' '\n' > %o; \
|> $(DEPOT_BIN_DIR)/libretro-$(DEPOT_NAME)/current/_ARCHIVES $(DEPOT_DIR)/<bin-archives>
!pkg = | $(VERSIONS_SED_FILE) |> ^ GENERATE %o^ \
echo $(PKG_DEPENDS) | tr ' ' '\n' \
> $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/archives; \
sed -f $(VERSIONS_SED_FILE) $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/archives \
> $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/_ARCHIVES; \
! grep ^local/ $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/_ARCHIVES; \
|> $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/archives $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/_ARCHIVES \
$(DEPOT_DIR)/<pkg-archives>
# Generate depot/local/pkg/.../current/[archives|_ARCHIVES]
PKG_DEPENDS += \
@(SDK_USER)/src/vfs/@(SDK_VERSION) \
@(SDK_USER)/src/libc/@(SDK_VERSION) \
local/src/libretro-$(DEPOT_NAME) \
local/src/retro_frontend \
# Implicit dependencies
!collect_raw = |> ^ COLLECT %o^ \
cp %f %o \
|> $(DEPOT_RAW_DIR)/$(DEPOT_NAME)/current/%b
!collect_bin = |> ^ COLLECT %o^ \
strip -o %o %f \
|> $(DEPOT_BIN_DIR)/libretro-$(DEPOT_NAME)/current/%b
!collect_runtime = |> ^ VALIDATE %o^ \
xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o \
|> $(DEPOT_PKG_DIR)/$(DEPOT_NAME)/current/runtime \
$(DEPOT_DIR)/<libretro-runtimes>
!libretro_cc = |> ^ CC %f^ \
$(CC) \
2019-03-14 15:15:40 +01:00
$(DEFINES) \
`pkg-config --cflags $(CORE_PKGS)` \
$(CFLAGS) $(INCFLAGS) \
`pkg-config --cflags genode-lib` \
-c %f -o %o \
|> %f.$(TARGET_NAME).o
2019-03-02 23:27:15 +01:00
!libretro_cxx = |> ^ CXX %f^ \
$(CXX) \
2019-03-14 15:15:40 +01:00
$(DEFINES) -std=gnu++11 \
2019-03-16 18:18:53 +01:00
`pkg-config --cflags $(CORE_PKGS)` \
2019-03-24 20:04:00 +01:00
$(CXXFLAGS) $(INCFLAGS) \
`pkg-config --cflags genode-lib` \
-c %f -o %o \
|> %f.$(TARGET_NAME).o
2019-03-02 23:27:15 +01:00
!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
2019-03-02 23:27:15 +01:00
LINK_T = $(TUP_CWD)/link.T
2019-03-14 15:15:40 +01:00
DEFINES += -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565
2019-03-24 20:04:00 +01:00
DEFINES += -DGIT_VERSION=\"$(GIT_VERSION)\"
NO_UNDEFINED = --no-undefined