CORE_PKGS += libc libm

# TODO: enable dynamic recompiler

include upstream/libretro/Makefile.common

CFLAGS += $(INCFLAGS)
CFLAGS += -DSIZEOF_DOUBLE=8
CFLAGS += -DUSE_16BPP=1
CFLAGS += -DUSE_RGB_565=1
CFLAGS += -DUSE_SCSP2=1
CFLAGS += -DNO_CLI
CFLAGS += -DHAVE_SYS_TIME_H
CFLAGS += -DHAVE_GETTIMEOFDAY
CFLAGS += -DVERSION=\"0.9.12\"
CFLAGS += -DHAVE_STRCASECMP
CFLAGS += -DINLINE="inline"

CFLAGS += -O3 -DNDEBUG

: foreach $(C68KEXEC_SOURCE) |> !libretro_cc -O0 -DNDEBUG |> %B.o {obj}
: foreach $(SOURCES_C) |> !libretro_cc |> {obj}

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

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