diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..49a7d4c --- /dev/null +++ b/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src . tests diff --git a/README.md b/README.md index 77753f9..330917d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,22 @@ Where the F are my trains? -A webapp to quickly look up what trains are doing stuff! +A webapp to quickly look up where your trains are! -* +* [ ] Be able to serve web pages + * [ ] Design the web pages +* [ ] Be able to query the MTA for Data + * [ ] Be able to make requests to the site + * [ ] Be able to authenticate requests + * [ ] Be able to store/load secrets + * [ ] Be able to parse GTFS feeds +* [ ] Build system + +# Building + +To build the project, use autotools. + +```sh +autoreconf && ./configure && make +``` + +To run unit tests, run `make check` diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f3b002b --- /dev/null +++ b/configure.ac @@ -0,0 +1,32 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.71]) +AC_INIT([wtftrains],[0.0.1],[sc-bugs@shanti.im]) +AC_CONFIG_SRCDIR([src/sekrits.c]) +AC_CONFIG_HEADERS([config.h]) +#AC_CONFIG_MACRO_DIRS([m4]) + +AM_PROG_AR + +AM_INIT_AUTOMAKE([foreign -Wall -Werror]) + +# Checks for programs. + +# Checks for libraries. +PKG_CHECK_MODULES([CHECK], [check >= 0.9.6]) +AC_PROG_CC +LT_INIT + +# Checks for header files. +AC_CHECK_HEADERS([stdlib.h]) + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. +AC_FUNC_MALLOC + +AC_CONFIG_FILES([Makefile + src/Makefile + tests/Makefile]) +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..23b150f --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,6 @@ +lib_LTLIBRARIES = libwtftrains.la +libwtftrains_la_SOURCES = sekrits.c sekrits.h arena.h arena.c + +bin_PROGRAMS = wtftrains +wtftrains_SOURCES = main.c +wtftrains_LDADD = libwtftrains.la diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 0000000..843e45c --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,7 @@ + +TESTS = check_sekrits + +check_PROGRAMS = check_sekrits +check_sekrits_SOURCES = check_sekrits.c $(top_builddir)/src/sekrits.h +check_sekrits_CFLAGS = @CHECK_CFLAGS@ +check_sekrits_LDADD = $(top_builddir)/src/libwtftrains.la @CHECK_LIBS@