From add554d70fd6c904ac73502e6746e700e961ae53 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Mon, 19 Oct 2015 03:13:48 +0800 Subject: Add a simple autotools build system --- Makefile.am | 13 +++++++++++++ autogen.sh | 18 ++++++++++++++++++ configure.ac | 26 ++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..fe67f74 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,13 @@ +# vim: set sw=8 ts=8 sts=8 noet: + +NULL = + +EXTRA_DIST = autogen.sh + +bin_PROGRAMS = scanner + +scanner_SOURCES = \ + lexer.l \ + symbol-table.h \ + symbol-table.c \ + $(NULL) diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..c2907c1 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +if [ "$#" = 0 ] && [ -z "$NOCONFIGURE" ]; then + echo "*** WARNING: I am going to run \`configure' with no arguments." >&2 + echo "*** If you wish to pass any to it, please specify them on the" >&2 + echo "*** \`$0' command line." >&2 + echo "" >&2 +fi + +( cd "$srcdir" && autoreconf -fiv && rm -rf autom4te.cache ) + +if [ -z "$NOCONFIGURE" ]; then + "$srcdir/configure" "$@" || exit 1 +fi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..9b312b3 --- /dev/null +++ b/configure.ac @@ -0,0 +1,26 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. +# vim: set sw=4 ts=4 sts=4 et: + +AC_INIT([ccmmc], [0.1]) +AC_CONFIG_SRCDIR([lexer.l]) +AC_CONFIG_HEADERS([config.h]) + +AM_INIT_AUTOMAKE([foreign subdir-objects]) +AM_SILENT_RULES([yes]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_CC_STDC +AM_PROG_LEX + +# Checks for libraries. + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT -- cgit v1.2.3