Skip to content

Commit

Permalink
BUILD: Add empty autotools frame
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Oct 23, 2014
1 parent 703c2e5 commit c8fa930
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -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)
20 changes: 20 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
@@ -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 =
17 changes: 17 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -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
Empty file added build-aux/config.rpath
Empty file.
71 changes: 71 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
AC_PREREQ([2.65])

AC_INIT([darkseed2-tools],[0.0.0],[[email protected]],[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
1 change: 1 addition & 0 deletions m4/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The extra m4 files go here
10 changes: 10 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
include $(top_srcdir)/Makefile.common

SUBDIRS = \
$(EMPTY)

noinst_HEADERS = \
$(EMPTY)

bin_PROGRAMS = \
$(EMPTY)

0 comments on commit c8fa930

Please sign in to comment.