# Extra linker arguments for this package, one per line. A line may be
# addressed to one target — @native, @wasi, @web — and an untagged line
# applies to all of them. ${NAME} expands from the environment. The selection
# and the expansion happen in Build, which is the only place that knows which
# target is being built; Load reads these lines and passes them through.

# The host. Fedora's package installs the versioned soname and no unversioned
# symlink, so -lraylib finds nothing and the file has to be named.
@native -l:libraylib.so.550
@native -lm

# The browser. No shared library exists for wasm, so this is a static archive
# built out of raylib's own sources by vendor/raylib/build-web.sh, pinned to
# the 5.5 tag that matches the host's .so.550 — raylib.flan carries raylib's
# struct layouts and enum values, and two targets built from different raylibs
# would disagree about them without saying so.
#
# FLAN_RAYLIB_WEB is where that archive is. Unset, a web build that reaches
# raylib is refused by name here rather than met as a page of undefined GLFW
# symbols; build-web.sh prints the line to export.
@web ${FLAN_RAYLIB_WEB}

# raylib's web platform is GLFW on emscripten's own port, not the rglfw.c it
# compiles in natively, and WebGL is GLES2. GL_ENABLE_GET_PROC_ADDRESS because
# rlgl asks for extension pointers by name.
@web -sUSE_GLFW=3
@web -sGL_ENABLE_GET_PROC_ADDRESS

# -sASYNCIFY is not here: Build adds it to every web link, because the reason
# for it is the browser's event loop and not raylib. See Build's comment on the
# main loop.
