CORE_PKGS += libc libm

LIBRETRO_COMM_DIR=

USE_CODEC_WAVE=1
USE_CODEC_FLAC=1
USE_CODEC_VORBIS=1

DEFINES += -DUSE_CODEC_WAVE
DEFINES += -DUSE_CODEC_FLAC
DEFINES += -DUSE_CODEC_VORBIS

DEFINES += -O2 -DNDEBUG

DEFINES += -DINLINE=inline
DEFINES += -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H
DEFINES += -DNQ_HACK -DQBASEDIR=$(CORE_DIR) -DTYR_VERSION=0.62
DEFINES += -fomit-frame-pointer

include upstream/Makefile.common

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

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

PKG_DEPENDS += \
	ehmry/raw/quake_shareware/1.06 \

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

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