CORE_PKGS += libc libm

include upstream/libretro-build/Makefile.common

DEFINES += -DMINIMAL_CORE=2 -DM_CORE_GBA -DM_CORE_GB
DEFINES += -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_LOCALE -DHAVE_LOCALTIME_R
DEFINES += -DINLINE=inline
DEFINES += -DCOLOR_16_BIT -DCOLOR_5_6_5
DEFINES += -DRESAMPLE_LIBRARY=2
DEFINES += -DM_PI=3.14159265358979323846
DEFINES += -DNDEBUG
DEFINES += -DUSE_VFS_FILE

CFLAGS += -O3
CFLAGS += $(INCLUDES)

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

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

PKG_DEPENDS += \
	@(PUBLIC_SRC_STDCXX) \

: $(TUP_CWD)/pkg.dhall |> !render_runtime |> {runtime}
: |> !pkg |>

: $(TUP_CWD)/pkg.dhall |> !index_pkg |>
