CORE_PKGS += stdcxx libc libm

NO_UNDEFINED =
	# Uses Genode API to create secondary stack

LIBRETRO_COMM_DIR =
	# TODO: update libretro-common

CFLAGS += -O3
CFLAGS += -DMRBOOM -DHAVE_IBXM -D_FORTIFY_SOURCE=0
CFLAGS += -DPLATFORM=\"genode\"
CFLAGS += -std=gnu99
CXXFLAGS += -std=c++98

include upstream/Makefile.common

: foreach $(SOURCES_C) |> !libretro_cc |> {libretro_objs}
: foreach $(SOURCES_CXX) |> !libretro_cxx |> {libretro_objs}

: {libretro_objs} |> !libretro_core_link |> {core}
: {core} |> !collect_bin |>
: |> !bin |>

PKG_DEPENDS += \
	@(PUBLIC_SRC_STDCXX) \

: $(TUP_CWD)/runtime |> !collect_pkg_runtime |>
: |> !pkg |>
