Commit a7dd7035 authored by Colomban Wendling's avatar Colomban Wendling

Fix use of user flags variables in the build systems

parent fb2b9348
......@@ -25,20 +25,18 @@ PKG_CHECK_MODULES([OVCCBOT], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}
ovcc >= ${OVCC_REQUIRE}
ovccclient >= ${OVCCCLIENT_REQUIRE}])
CFLAGS="${CFLAGS} ${OVCCBOT_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${OVCCBOT_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc --pkg ovccclient"
OVCCBOT_VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc --pkg ovccclient"
# check for posix
VALA_CHECK_PACKAGES([posix], [VALAFLAGS="$VALAFLAGS --pkg posix -D HAVE_POSIX"])
VALA_CHECK_PACKAGES([posix], [OVCCBOT_VALAFLAGS="$OVCCBOT_VALAFLAGS --pkg posix -D HAVE_POSIX"])
# get the correct VAPI directory for ovcc
AC_MSG_CHECKING([for OVCC VAPI dir])
ovcc_vapidir="$($PKG_CONFIG --variable prefix ovcc)/share/vala/vapi"
VALAFLAGS="$VALAFLAGS --vapidir=$ovcc_vapidir"
OVCCBOT_VALAFLAGS="$OVCCBOT_VALAFLAGS --vapidir=$ovcc_vapidir"
AC_MSG_RESULT([$ovcc_vapidir])
AC_SUBST([VALAFLAGS])
AC_SUBST([OVCCBOT_VALAFLAGS])
# Checks for header files.
......
......@@ -2,5 +2,7 @@ bin_PROGRAMS = ovccbot
ovccbot_CPPFLAGS = -DG_LOG_DOMAIN=\"OVCCBot\"
ovccbot_VALAFLAGS = $(VALAFLAGS)
ovccbot_CFLAGS = $(OVCCBOT_CFLAGS)
ovccbot_LDADD = $(OVCCBOT_LIBS)
ovccbot_VALAFLAGS = $(OVCCBOT_VALAFLAGS)
ovccbot_SOURCES = main.vala
......@@ -34,10 +34,10 @@ LIBXML_REQUIRE=2.0
PKG_CHECK_MODULES([LIBOVCC], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}
libxml-2.0 >= ${LIBXML_REQUIRE}])
CFLAGS="${CFLAGS} ${LIBOVCC_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${LIBOVCC_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg libxml-2.0"
AC_SUBST([VALAFLAGS])
LIBOVCC_VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg libxml-2.0"
AC_SUBST([LIBOVCC_CFLAGS])
AC_SUBST([LIBOVCC_LIBS])
AC_SUBST([LIBOVCC_VALAFLAGS])
# Checks for header files.
......
......@@ -5,33 +5,36 @@ noinst_PROGRAMS = test
EXTRA_DIST = hack.h hack.vapi \
ovcc.h ovcc.vapi
libovcc_la_CPPFLAGS = -DG_LOG_DOMAIN=\"LibOVCC\"
libovcc_la_VALAFLAGS = $(VALAFLAGS) --library=ovcc --header=ovcc.h \
libovcc_la_CPPFLAGS = -DG_LOG_DOMAIN=\"LibOVCC\"
libovcc_la_CFLAGS = $(LIBOVCC_CFLAGS)
libovcc_la_LIBS = $(LIBOVCC_LIBS)
libovcc_la_VALAFLAGS = $(LIBOVCC_VALAFLAGS) --library=ovcc --header=ovcc.h \
--vapidir=. --pkg=hack
libovcc_la_SOURCES = ovcc-board.vala \
ovcc-game.vala \
ovcc-pawn.vala \
ovcc-player.vala \
ovcc-sig-queue.vala \
ovcc-stack.vala \
ovcc-tile.vala \
ovcc-tile-object.vala \
ovcc-tile-set.vala \
ovcc-tiles-def.vala \
ovcc-utils.vala \
network/ovcc-network-message.vala \
network/ovcc-network-empty-message.vala \
network/ovcc-network-string-message.vala \
network/ovcc-network-variant-message.vala \
network/ovcc-network-login-message.vala \
network/ovcc-network-signals.vala \
network/ovcc-network-disconnect-message.vala \
network/ovcc-network-welcome-message.vala \
network/ovcc-network-error-message.vala
ovccinclude_HEADERS = ovcc.h
vapi_DATA = ovcc.vapi
libovcc_la_SOURCES = ovcc-board.vala \
ovcc-game.vala \
ovcc-pawn.vala \
ovcc-player.vala \
ovcc-sig-queue.vala \
ovcc-stack.vala \
ovcc-tile.vala \
ovcc-tile-object.vala \
ovcc-tile-set.vala \
ovcc-tiles-def.vala \
ovcc-utils.vala \
network/ovcc-network-message.vala \
network/ovcc-network-empty-message.vala \
network/ovcc-network-string-message.vala \
network/ovcc-network-variant-message.vala \
network/ovcc-network-login-message.vala \
network/ovcc-network-signals.vala \
network/ovcc-network-disconnect-message.vala \
network/ovcc-network-welcome-message.vala \
network/ovcc-network-error-message.vala
ovccinclude_HEADERS = ovcc.h
vapi_DATA = ovcc.vapi
test_LDADD = libovcc.la -lpthread
test_CFLAGS = $(LIBOVCC_CFLAGS)
test_LDADD = $(LIBOVCC_LIBS) libovcc.la -lpthread
test_SOURCES = test.c
......
......@@ -31,17 +31,15 @@ OVCC_REQUIRE=0.0
PKG_CHECK_MODULES([LIBOVCCCLIENT], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}
ovcc >= ${OVCC_REQUIRE}])
CFLAGS="${CFLAGS} ${LIBOVCCCLIENT_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${LIBOVCCCLIENT_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc"
LIBOVCCCLIENT_VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc"
# get the correct VAPI directory for ovcc
AC_MSG_CHECKING([for OVCC VAPI dir])
ovcc_vapidir="$($PKG_CONFIG --variable prefix ovcc)/share/vala/vapi"
VALAFLAGS="$VALAFLAGS --vapidir=$ovcc_vapidir"
LIBOVCCCLIENT_VALAFLAGS="$LIBOVCCCLIENT_VALAFLAGS --vapidir=$ovcc_vapidir"
AC_MSG_RESULT([$ovcc_vapidir])
AC_SUBST([VALAFLAGS])
AC_SUBST([LIBOVCCCLIENT_VALAFLAGS])
# Checks for header files.
......
lib_LTLIBRARIES = libovccclient.la
libovccclient_la_CPPFLAGS = -DG_LOG_DOMAIN=\"LibOVCCClient\"
libovccclient_la_VALAFLAGS = $(VALAFLAGS) --library=ovccclient --header=ovccclient.h \
libovccclient_la_CPPFLAGS = -DG_LOG_DOMAIN=\"LibOVCCClient\"
libovccclient_la_CFLAGS = $(LIBOVCCCLIENT_CFLAGS)
libovccclient_la_LIBS = $(LIBOVCCCLIENT_LIBS)
libovccclient_la_VALAFLAGS = $(LIBOVCCCLIENT_VALAFLAGS) \
--library=ovccclient --header=ovccclient.h \
--vapidir=.
libovccclient_la_SOURCES = ovccclient-client.vala \
ovccclient-server.vala \
ovccclient-game.vala
ovccclientinclude_HEADERS = ovccclient.h
vapi_DATA = ovccclient.vapi
libovccclient_la_SOURCES = ovccclient-client.vala \
ovccclient-server.vala \
ovccclient-game.vala
ovccclientinclude_HEADERS = ovccclient.h
vapi_DATA = ovccclient.vapi
# hack: add prefix to header filename in VAPI file
......
......@@ -23,17 +23,15 @@ OVCC_REQUIRE=0.0
PKG_CHECK_MODULES([OVCCSERVER], [glib-2.0 >= ${GLIB_REQUIRE}
gio-2.0 >= ${GIO_REQUIRE}
ovcc >= ${OVCC_REQUIRE}])
CFLAGS="${CFLAGS} ${OVCCSERVER_CFLAGS} -Werror-implicit-function-declaration"
LIBS="${LIBS} ${OVCCSERVER_LIBS}"
VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc"
OVCCSERVER_VALAFLAGS="--pkg glib-2.0 --pkg gio-2.0 --pkg ovcc"
# get the correct VAPI directory for ovcc
AC_MSG_CHECKING([for OVCC VAPI dir])
ovcc_vapidir="$($PKG_CONFIG --variable prefix ovcc)/share/vala/vapi"
VALAFLAGS="$VALAFLAGS --vapidir=$ovcc_vapidir"
OVCCSERVER_VALAFLAGS="$OVCCSERVER_VALAFLAGS --vapidir=$ovcc_vapidir"
AC_MSG_RESULT([$ovcc_vapidir])
AC_SUBST([VALAFLAGS])
AC_SUBST([OVCCSERVER_VALAFLAGS])
# Checks for header files.
......
......@@ -2,13 +2,17 @@ bin_PROGRAMS = ovccserver ovccclient
ovccserver_CPPFLAGS = -DG_LOG_DOMAIN=\"OVCCServer\"
ovccserver_VALAFLAGS = $(VALAFLAGS) --thread
ovccserver_CFLAGS = $(OVCCSERVER_CFLAGS)
ovccserver_LDADD = $(OVCCSERVER_LIBS)
ovccserver_VALAFLAGS = $(OVCCSERVER_VALAFLAGS) --thread
ovccserver_SOURCES = client.vala \
server.vala \
main.vala
ovccclient_CPPFLAGS = -DG_LOG_DOMAIN=\"OVCCClient\"
ovccclient_VALAFLAGS = $(VALAFLAGS) --thread
ovccclient_CFLAGS = $(OVCCSERVER_CFLAGS)
ovccclient_LDADD = $(OVCCSERVER_LIBS)
ovccclient_VALAFLAGS = $(OVCCSERVER_VALAFLAGS) --thread
ovccclient_SOURCES = client.vala \
clientmain.vala \
server.vala
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment