diff --git a/Makefile.am b/Makefile.am index 6ca17ef..bf07d36 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,11 @@ -SUBDIRS = src bin_PROGRAMS = tlclient -tlclient_SOURCES = src/main.c -tlclient_LDADD = src/libtlclient.la @TL_CLIENT_LIBS@ -tlclient_CFLAGS = @TL_CLIENT_CFLAGS@ - -pkgconfig_DATA = tlclient.pc +tlclient_SOURCES = src/main.c \ + src/game.c \ + src/game.h +tlclient_LDADD = $(AM_LIBS) @TL_CLIENT_LIBS@ +tlclient_CPPFLAGS = @TL_DEBUG_CPPFLAGS@ +tlclient_CFLAGS = $(AM_CFLAGS) @TL_CLIENT_CFLAGS@ ACLOCAL_AMFLAGS = -I build/m4 diff --git a/configure.ac b/configure.ac index 3ccc161..4f29936 100644 --- a/configure.ac +++ b/configure.ac @@ -9,46 +9,17 @@ AC_INIT([TuneL client], AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_AUX_DIR([build/aux]) AC_CONFIG_MACRO_DIR([build/m4]) -AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror foreign]) +AM_INIT_AUTOMAKE([1.11.1 -Wall foreign subdir-objects]) AC_CONFIG_HEADERS([config.h]) -AM_PROG_AR AM_SILENT_RULES([yes]) # Checks for programs. -LT_PREREQ([2.2.0]) -LT_INIT AC_PROG_CC AM_PROG_CC_C_O # basic setup -# -# revision of the library -# -# CURRENT:REVISION:AGE -# -# Please remeber to bump library version before releases -# Remeberer: -# ===================================================================== -# | If you have... | Bump version to | -# ===================================================================== -# | Not changed the interface (bug fixes) | CURRENT:REV+1:AGE | -# --------------------------------------------------------------------- -# | Augmented the interface (new functions) | CURRENT+1:0:AGE+1 | -# --------------------------------------------------------------------- -# | Broken old interface (e.g. removed functions) | CURRENT+1:0:0 | -# --------------------------------------------------------------------- -TL_CLIENT_LTVERSION="0:0:0" -AC_SUBST([TL_CLIENT_LTVERSION]) - -pkgconfigdir="$libdir/pkgconfig" -tl_includedir="$includedir/tunel" -tl_include_dir="$tl_includedir/client" -AC_SUBST(pkgconfigdir) -AC_SUBST(tl_includedir) -AC_SUBST(tl_include_clientdir) - # Checks for libraries. # AX_REQUIRE_HEADER(HEADER, IF-PRESENT) @@ -116,57 +87,28 @@ AC_CHECK_FUNCS([strchr]) # Tuning AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], [enable debugging [[default=yes]]]), + [AS_HELP_STRING([--enable-debug], [enable debugging [[default=yes]]])], [enable_debug="$enableval"], [enable_debug="yes"]) -AC_MSG_CHECKING([[whether to enable debugging]]) -if test "x$enable_debug" = "xyes"; then - AC_DEFINE([TL_DEBUG], [1], [is debugging enabled]) - # FIXME: please only use TL_DEBUG, not DEBUG - DEBUG_CPPFLAGS="-DTL_DEBUG -DDEBUG" - CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS" - AC_MSG_RESULT([[yes]]) -else - DEBUG_CFLAGS= - AC_MSG_RESULT([[no]]) -fi -AC_SUBST([DEBUG_CFLAGS]) - -AC_ARG_ENABLE([paranoia], - AC_HELP_STRING([--enable-paranoia], - [enable excessively strict compiler options \ - (works only with GCC and compatible) [[default=no]]]), - [enable_paranoia="$enableval"], - [enable_paranoia="no"]) -AC_MSG_CHECKING([[whether to enable paranoiac compiler options]]) -if test "x$enable_paranoia" = "xyes"; then - CFLAGS="$CFLAGS \ - -Wall -W -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int \ - -Werror-implicit-function-declaration -Wmain -Wparentheses -Wsequence-point \ - -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas \ - -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast \ - -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return \ - -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ - -Wmissing-noreturn -Wformat -Wmissing-format-attribute \ - -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs \ - -Winline -Wlong-long -Wunreachable-code -pedantic" - AC_MSG_RESULT([[yes]]) -else - AC_MSG_RESULT([[no]]) -fi +AC_MSG_CHECKING([whether to enable debugging]) +AS_IF([test "x$enable_debug" = "xyes"], + [AC_DEFINE([TL_DEBUG], [1], [is debugging enabled]) + # FIXME: please only use TL_DEBUG, not DEBUG + TL_DEBUG_CPPFLAGS="-DTL_DEBUG -DDEBUG" + AC_MSG_RESULT([yes])], + [TL_DEBUG_CPPFLAGS= + AC_MSG_RESULT([no])]) +AC_SUBST([TL_DEBUG_CPPFLAGS]) # output AC_CONFIG_FILES([Makefile - tlclient.pc - src/Makefile - ]) + src/Makefile]) AC_OUTPUT echo "------------------------------------------" echo "Configuration choices:" echo "* Debugging enabled : $enable_debug" -echo "* Paranoiac compiler options : $enable_paranoia" echo "* Base installation directory : $prefix" echo "" echo "Now type 'make' to build $PACKAGE_NAME" diff --git a/src/Makefile.am b/src/Makefile.am index 146cf87..1c8de27 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,3 @@ - -lib_LTLIBRARIES = libtlclient.la - -AM_LDFLAGS = -version-info @TL_CLIENT_LTVERSION@ -AM_CFLAGS = @TL_CLIENT_CFLAGS@ -#AM_CXXFLAGS= @TL_CLIENT_CXXFLAGS@ -libtlclient_la_LIBADD = $(AM_LIBS) @TL_CLIENT_LIBS@ -libtlclient_la_SOURCES = game.c - -tl_include_client_HEADERS = game.h +# dummy Makefile to chain up to the top non-recursive one, so one can run +# make in this directory +SUBDIRS = $(top_builddir) diff --git a/tlclient.pc.in b/tlclient.pc.in deleted file mode 100644 index e76d3af..0000000 --- a/tlclient.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: TuneL server library -Description: TuneL server library -Version: @VERSION@ -Requires: sceutils tlcommon -Libs: -L${libdir} -ltlserver -Libs.private: -lpthread -Cflags: -I${includedir} @DEBUG_CFLAGS@