Browse Source

Add build scripts

Definitely need better documentation, but I'm just trying to checkpoint
everything right now.
trunk
Shanti Chellaram 5 years ago
parent
commit
e071294adf
  1. 1
      Makefile.am
  2. 21
      README.md
  3. 32
      configure.ac
  4. 6
      src/Makefile.am
  5. 7
      tests/Makefile.am

1
Makefile.am

@ -0,0 +1 @@
SUBDIRS = src . tests

21
README.md

@ -1,5 +1,22 @@
Where the F are my trains? 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`

32
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

6
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

7
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@
Loading…
Cancel
Save