summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2015-10-19 03:13:48 +0800
committerTing-Wei Lan <lantw44@gmail.com>2015-10-19 03:13:48 +0800
commitadd554d70fd6c904ac73502e6746e700e961ae53 (patch)
treee388af1efe3fc851d2d3680f7a7f63d59e35edff
parent274a987bc3d8f03cd9a04fa7da93c5e54fc2c10c (diff)
downloadcompiler2015-add554d70fd6c904ac73502e6746e700e961ae53.tar
compiler2015-add554d70fd6c904ac73502e6746e700e961ae53.tar.gz
compiler2015-add554d70fd6c904ac73502e6746e700e961ae53.tar.bz2
compiler2015-add554d70fd6c904ac73502e6746e700e961ae53.tar.lz
compiler2015-add554d70fd6c904ac73502e6746e700e961ae53.tar.xz
compiler2015-add554d70fd6c904ac73502e6746e700e961ae53.tar.zst
compiler2015-add554d70fd6c904ac73502e6746e700e961ae53.zip
Add a simple autotools build system
-rw-r--r--Makefile.am13
-rwxr-xr-xautogen.sh18
-rw-r--r--configure.ac26
3 files changed, 57 insertions, 0 deletions
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