diff --git a/Makefile.am b/Makefile.am index c2fb801..fd4c83e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ # Automake targets and declarations for ttyvaders ############################################################################### -SUBDIRS = src +SUBDIRS = libee test src DIST_SUBDIRS = $(SUBDIRS) autotools debian EXTRA_DIST = doc/shapes.txt bootstrap diff --git a/configure.ac b/configure.ac index 2a574c9..f96ccf2 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,7 @@ AM_CONFIG_HEADER(config.h) AM_PROG_CC_C_O AC_PROG_CPP +AC_PROG_RANLIB AC_ARG_ENABLE(slang, [ --enable-slang slang graphics support (default enabled)]) @@ -41,6 +42,8 @@ AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES}) AC_OUTPUT([ Makefile + libee/Makefile + test/Makefile src/Makefile autotools/Makefile debian/Makefile diff --git a/libee/Makefile.am b/libee/Makefile.am new file mode 100644 index 0000000..ccfca84 --- /dev/null +++ b/libee/Makefile.am @@ -0,0 +1,11 @@ +if USE_SLANG +CPPFLAGS_slang = -DUSE_SLANG +endif +if USE_NCURSES +CPPFLAGS_ncurses = -DUSE_NCURSES +endif + +lib_LIBRARIES = libee.a +libee_a_SOURCES = ee.c +libee_a_CPPFLAGS = -I../src $(CPPFLAGS_slang) $(CPPFLAGS_ncurses) + diff --git a/src/Makefile.am b/src/Makefile.am index c1da2a0..229a55c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,7 +26,6 @@ ttyvaders_SOURCES = \ collide.c \ common.h \ explosions.c \ - ../libee/ee.c \ main.c \ math.c \ overlay.c \ @@ -37,5 +36,5 @@ ttyvaders_SOURCES = \ $(NULL) ttyvaders_CPPFLAGS = $(CPPFLAGS_slang) $(CPPFLAGS_ncurses) -ttyvaders_LDADD = $(LDFLAGS_slang) $(LDFLAGS_ncurses) +ttyvaders_LDADD = ../libee/libee.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..e69de29