diff options
author | P. J. McDermott <pjm@nac.net> | 2013-02-15 17:18:50 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-02-15 17:18:50 (EST) |
commit | 155983d543d024ed953d0d8301ddbca1d20c3142 (patch) | |
tree | 7ca496de720e0beca57dbd09a7de5de7e49a9c96 | |
parent | 858fa5782ff29ce007e3f50a257efb7014cf556e (diff) | |
download | overworld-rpg-155983d543d024ed953d0d8301ddbca1d20c3142.zip overworld-rpg-155983d543d024ed953d0d8301ddbca1d20c3142.tar.gz overworld-rpg-155983d543d024ed953d0d8301ddbca1d20c3142.tar.bz2 |
Use GNU Autoconf and Automake.
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | AUTHORS | 0 | ||||
-rw-r--r-- | COPYING | 0 | ||||
-rw-r--r-- | ChangeLog | 0 | ||||
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | Makefile.am | 17 | ||||
-rw-r--r-- | NEWS | 0 | ||||
-rw-r--r-- | README | 0 | ||||
-rw-r--r-- | configure.ac | 33 |
9 files changed, 60 insertions, 22 deletions
@@ -1,3 +1,13 @@ +aclocal.m4 +autom4te.cache/ +configure +compile +install-sh +missing +INSTALL +depcomp +Makefile.in + *.o sdlex a.out diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ChangeLog diff --git a/Makefile b/Makefile deleted file mode 100644 index 2648c43..0000000 --- a/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -.SUFFIXES = -.SUFFIXES = .c .h .o - -CC = gcc -CFLAGS = -Wall -Wextra -Werror -g - -SRCS = src/main.c src/init.c src/logging.c \ - src/base64.c src/compression.c \ - src/tmx.c src/resources/resource.c src/resources/image.c -OBJS = $(SRCS:.c=.o) -LIBS = sdl SDL_image zlib expat - -all: sdlex - -sdlex: $(OBJS) - $(CC) $(LDFLAGS) -o sdlex $$(pkg-config --libs $(LIBS)) $(OBJS) - -.c.o: - $(CC) -c $(CFLAGS) -o $*.o $$(pkg-config --cflags $(LIBS)) $< - -clean: - rm -f $(OBJS) sdlex diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..b7a392e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,17 @@ +bin_PROGRAMS = sdlex + +sdlex_SOURCES = src/main.c src/init.c src/logging.c \ + src/base64.c src/compression.c \ + src/tmx.c src/resources/resource.c src/resources/image.c + +sdlex_CFLAGS = $(GCC_CFLAGS) \ + $(SDL_CFLAGS) \ + $(SDL_IMAGE_CFLAGS) \ + $(ZLIB_CFLAGS) \ + $(EXPAT_CFLAGS) + +sdlex_LDADD = $(SDL_LIBS) \ + $(SDL_IMAGE_LIBS) \ + $(ZLIB_LIBS) \ + $(EXPAT_LIBS) + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..4cc7b38 --- /dev/null +++ b/configure.ac @@ -0,0 +1,33 @@ +AC_INIT([sdlex], [0.1.0], [pjm@nac.net]) +AC_CONFIG_SRCDIR([src/main.c]) + +AM_INIT_AUTOMAKE([subdir-objects]) + +AC_PROG_CC() +AM_PROG_CC_C_O() + +AC_C_INLINE() + +AC_CHECK_HEADERS([stdlib.h]) +AC_CHECK_HEADERS([string.h]) + +AC_TYPE_SIZE_T() + +AC_FUNC_MALLOC() +AC_CHECK_FUNCS([memset]) +AC_CHECK_FUNCS([strdup]) +AC_CHECK_FUNCS([strndup]) + +PKG_PROG_PKG_CONFIG() +PKG_CHECK_MODULES([SDL], [sdl]) +PKG_CHECK_MODULES([SDL_IMAGE], [SDL_image]) +PKG_CHECK_MODULES([ZLIB], [zlib]) +PKG_CHECK_MODULES([EXPAT], [expat]) + +if test "x$GCC" = "xyes"; then + GCC_CFLAGS="-Wall -Wextra -Werror -pedantic" +fi +AC_SUBST(GCC_CFLAGS) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT() |