Hash :
cf3e8034
Author :
Thomas de Grivel
Date :
2022-11-03T10:32:39
licence
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#!/bin/sh
## rtbuf
## Copyright 2018-2022 kmx.io <contact@kmx.io>
##
## Permission is hereby granted to use this software granted
## the above copyright notice and this permission paragraph
## are included in all copies and substantial portions of this
## software.
##
## THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
## PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER SHALL THE
## AUTHOR BE CONSIDERED LIABLE FOR THE USE AND PERFORMANCE OF
## THIS SOFTWARE.
set -e
. ../../config.subr
SOURCES="$(ls *.c | tr '\n' ' ')"
require_pkg_config
CPPFLAGS="$CPPFLAGS $(pkg-config --cflags-only-I glfw3)"
CPPFLAGS="$CPPFLAGS -DGL_SILENCE_DEPRECATION=1"
echo "CPPFLAGS = $CPPFLAGS" >> ${CONFIG_MK}
if [ x"$DEBUG" = x"yes" ]; then
CFLAGS="$CFLAGS -DDEBUG -O0 -ggdb"
else
CFLAGS="$CFLAGS -DNDEBUG -O3"
fi
CFLAGS="$CFLAGS -W -Wall -Werror -std=c89 -pedantic"
CFLAGS="$CFLAGS $(pkg-config --cflags-only-other glfw3)"
echo "CFLAGS = $CFLAGS" >> ${CONFIG_MK}
echo "LDFLAGS = $LDFLAGS" >> ${CONFIG_MK}
LIBS=""
LIBS="$LIBS $(pkg-config --libs glfw3)"
LIBS="$LIBS $(pkg-config --libs gl)"
LIBS="$LIBS ../librtbuf_music.la"
LIBS="$LIBS ../librtbuf_signal.la"
LIBS="$LIBS ../../librtbuf/librtbuf.la"
echo "LIBS = $LIBS" >> ${CONFIG_MK}
rtbuf_library glfw3