Permalink
Browse files

Create automake rules so we actually build.

  • Loading branch information...
scarabeusiv authored and hroncok committed Oct 20, 2013
1 parent 76cdf65 commit 6c9ab4ad311b0da6e9885cefa1a6791365b0a2e3
Showing with 44 additions and 32 deletions.
  1. +6 −1 .gitignore
  2. 0 ChangeLog → ChangeLog.old
  3. +26 −16 Makefile.am
  4. +12 −15 configure.ac
View
@@ -14,8 +14,13 @@ depcomp
install-sh
libtool
ltmain.sh
m4
m4/
missing
mkinstalldirs
stamp-h1
*.pc
.deps/
*.o
*.tar.*
admesh
File renamed without changes.
View
@@ -1,21 +1,31 @@
#! /bin/sh
ACLOCAL_AMFLAGS = -I m4
SHELL = /bin/sh
CC = @CC@
CFLAGS = -I@srcdir@ @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
.SUFFIXES:
.SUFFIXES: .c .o
pkgconfdir = $(libdir)/pkgconfig
OBJ = admesh.o connect.o stl_io.o stlinit.o util.o normals.o shared.o @LIBOBJS@
EXTRA_DIST = \
ADMESH.DOC \
COPYING \
README \
INSTALL \
ChangeLog.old
all: @srcdir@/configure $(OBJ)
$(CC) @LDFLAGS@ -o admesh $(OBJ) @LIBS@
clean:
rm -f $(OBJ) admesh core admesh.core core.admesh
rm -f config.h config.log config.status\
config.cache Makefile
bin_PROGRAMS = admesh
admesh_SOURCES = \
admesh.c \
connect.c \
getopt.c \
getopt1.c \
normals.c \
shared.c \
stlinit.c \
stl_io.c \
util.c \
getopt.h \
stl.h
distclean-local:
rm -rf *.cache *~
dist-hook:
git log --date=short --pretty="format:@%cd %an <%ae> [%H]%n%n%s%n%n%e%b" | sed -e "s|^\([^@]\)|\t\1|" -e "s|^@||" >$(distdir)/ChangeLog
View
@@ -31,27 +31,24 @@ AC_PROG_LIBTOOL
# Check for cflags
# ================
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--disable-werror], [Treat all warnings as errors, useful for development])],
[enable_werror="$enableval"],
[enable_werror=yes]
[AS_HELP_STRING([--enablee-werror], [Treat all warnings as errors, useful for development])],
[enable_werror="$enableval"],
[enable_werror=no]
)
AS_IF([test x"$enable_werror" != "xno"], [
CFLAGS="$CFLAGS -Werror"
CXXFLAGS="$CXXFLAGS -Werror"
CFLAGS="$CFLAGS -Werror"
CXXFLAGS="$CXXFLAGS -Werror"
])
AS_IF([test x"$GCC" = xyes], [
# Be tough with warnings and produce less careless code
CFLAGS="$CFLAGS -Wall -Wextra -pedantic"
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow -pedantic"
# Be tough with warnings and produce less careless code
CFLAGS="$CFLAGS -Wall -Wextra -pedantic"
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow -pedantic"
])
# ==============
# Find some libs
# ==============
# =========
# Find libs
# =========
AC_CHECK_LIB(m, main)
AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"])
AC_SUBST(LIBOBJS)
# =====================
# Prepare all .in files
@@ -68,6 +65,6 @@ AC_OUTPUT
AC_MSG_NOTICE([
==============================================================================
Build configuration:
werror: ${enable_werror}
werror: ${enable_werror}
==============================================================================
])

0 comments on commit 6c9ab4a

Please sign in to comment.