CORE_PKGS += stdcxx libc libm
NO_UNDEFINED =

include upstream/libretro/Makefile.common

CODE_DEFINES = -fomit-frame-pointer -fno-exceptions -fno-rtti -pedantic 
WARNINGS_DEFINES = -Wall -W -Wno-unused-parameter

CFLAGS += -O2 -DNDEBUG
CFLAGS += -DHAVE_STDINT_H -DHAVE_STRINGS_H
CXXFLAGS += $(CODE_DEFINES) $(WARNINGS_DEFINES)
CXXFLAGS += -DRIGHTSHIFT_IS_SAR -D__LIBRETRO__ -DALLOW_CPU_OVERCLOCK

: 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 |>
