diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..3fd7089 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,18 @@ +include $(top_srcdir)/Makefile.common + +ACLOCAL_AMFLAGS = -I m4 --install + +EXTRA_DIST = \ + autogen.sh \ + README.md \ + $(EMPTY) + +dist_doc_DATA = \ + COPYING \ + AUTHORS \ + README.md \ + $(EMPTY) + +SUBDIRS = \ + src \ + $(EMPTY) diff --git a/Makefile.common b/Makefile.common new file mode 100644 index 0000000..6df5ad6 --- /dev/null +++ b/Makefile.common @@ -0,0 +1,20 @@ +AUTOMAKE_OPTIONS = subdir-objects + +EMPTY = + +LIBSF_C_CXX = $(DS2TOOLS_CFLAGS) +LIBSF_CXX = + +LIBSL = $(DS2TOOLS_LIBS) + +FLAGS_C_CXX = -I$(top_srcdir) -I$(top_srcdir)/src/ -ggdb -Wall -Wno-multichar \ + -Wpointer-arith -Wshadow -Wsign-compare -Wtype-limits \ + -Wuninitialized -Wunused-parameter $(WERROR) +FLAGS_C = +FLAGS_CXX = -Wnon-virtual-dtor + +AM_CFLAGS = $(FLAGS_C_CXX) $(FLAGS_C) $(LIBSF_C_CXX) $(LIBSF_C) +AM_CXXFLAGS = $(FLAGS_C_CXX) $(FLAGS_CXX) $(LIBSF_C_CXX) $(LIBSF_CXX) +LDADD = $(LIBSL) + +LIBS = diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..4ddff99 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +olddir=`pwd` +cd $srcdir + +AUTORECONF=`which autoreconf` +if test -z $AUTORECONF; then + echo "*** No autoreconf found, please install it ***" + exit 1 +fi + +autoreconf --force --install --verbose + +cd $olddir diff --git a/build-aux/config.rpath b/build-aux/config.rpath new file mode 100644 index 0000000..e69de29 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..b4cac65 --- /dev/null +++ b/configure.ac @@ -0,0 +1,71 @@ +AC_PREREQ([2.65]) + +AC_INIT([darkseed2-tools],[0.0.0],[drmccoy@drmccoy.de],[darkseed2-tools],[https://github.com/DrMcCoy/darkseed2-tools/]) + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_SRCDIR([config.h.in]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([build-aux]) + +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability no-dist-gzip dist-xz subdir-objects]) +# Support silent build rules. Disable +# by either passing --disable-silent-rules to configure or passing V=1 +# to make +AM_SILENT_RULES([yes]) + +dnl If AM_PROG_AR exists, call it, to shut up a libtool warning (and make it more portable, I guess?) +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + +dnl libtool +LT_PREREQ([2.2]) +LT_INIT([disable-shared]) + +dnl We're C++ +AC_PROG_CXX +AM_PROG_CC_C_O +dnl We want a make install +AC_PROG_INSTALL + +dnl --with-werror +AC_ARG_WITH([werror], [AS_HELP_STRING([--with-werror], [Compile with -Werror @<:@default=no@:>@])], [], [with_werror=no]) + +AS_IF([test "x$with_werror" = "xyes"], [WERROR="-Werror -Werror=unused-but-set-variable"]) + +dnl Standard C, C++ +AC_C_CONST +AC_HEADER_STDC + +dnl Endianness +AC_C_BIGENDIAN() + +dnl Special variables of the size of pointers +AC_TYPE_INTPTR_T +AC_TYPE_UINTPTR_T + +dnl Extra flags +AS_CASE([$target], + [*darwin*], [ + DS2TOOLS_CFLAGS="-DUNIX -DMACOSX" + DS2TOOLS_LIBS="" + ], + [*mingw*], [ + DS2TOOLS_CFLAGS="-mconsole" + DS2TOOLS_LIBS="" + ], + [ + DS2TOOLS_CFLAGS="-DUNIX" + DS2TOOLS_LIBS="" + ] +) + +AC_SUBST(DS2TOOLS_CFLAGS) +AC_SUBST(DS2TOOLS_LIBS) + +AC_SUBST(WERROR) + +AC_CONFIG_FILES([src/Makefile]) +AC_CONFIG_FILES([Makefile]) + +AC_OUTPUT diff --git a/m4/README b/m4/README new file mode 100644 index 0000000..b842a29 --- /dev/null +++ b/m4/README @@ -0,0 +1 @@ +The extra m4 files go here diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..2a272f6 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,10 @@ +include $(top_srcdir)/Makefile.common + +SUBDIRS = \ + $(EMPTY) + +noinst_HEADERS = \ + $(EMPTY) + +bin_PROGRAMS = \ + $(EMPTY)