diff --git a/.gitignore b/.gitignore index c068ffd..2a842a5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ Makefile NEWS pipecolors.pc README -test +tests/test Makefile.in aclocal.m4 autom4te.cache @@ -26,5 +26,9 @@ config.h config.status libtool stamp-h1 +# Ignore output files +libpipecolors.o +libpipecolors.so + # Ignore backup files *~ \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index 7f8c7ea..fc6b7b9 100755 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ pkgconfig_DATA = pipecolors.pc -AM_CXXFLAGS =+ -std=c++11 -fPIC -pipe -ACLOCAL_AMFLAGS =+ -I m4 +AM_CXXFLAGS += -std=c++11 -fPIC -pipe +ACLOCAL_AMFLAGS = -I m4 LIBTOOL_DEPS += @LIBTOOL_DEPS@ libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status libtool @@ -15,4 +15,5 @@ libpipecolors_so_SOURCES = libpipecolors.cpp libpipecolors_so_LDFLAGS = \ -shared \ -fPIC \ - -Wl,-soname,libpipecolors.so.0.1 + -Wl,-soname,libpipecolors.so.0.1 \ + -ltermcap diff --git a/autogen.sh b/autogen.sh index 1c40efa..9e5b8bb 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,6 +3,8 @@ set -x test -d autom4te.cache && rm -rf autom4te.cache +test -d config && rm -rf config || exit 1 +mkdir config || exit 1 libtoolize --install --copy || exit 1 aclocal -I config || exit 1 autoheader || exit 1 diff --git a/pipecolors.h b/pipecolors.h index 277c419..6c6a0c1 100644 --- a/pipecolors.h +++ b/pipecolors.h @@ -11,4 +11,4 @@ void cprintf(const char* format, ...); #ifdef __cplusplus } #endif -#endif + diff --git a/test.cpp b/tests/test.cpp similarity index 86% rename from test.cpp rename to tests/test.cpp index 3f91727..860c5aa 100644 --- a/test.cpp +++ b/tests/test.cpp @@ -4,7 +4,7 @@ int main(void) { const char* str = "|0101|0202|0303|0404|0505|0606|0707|0808|0909|1010|1111|1212|1313|1414|1515"; - const char* name = "|01P|02i|03p|04e|05c|06ol|07o|08r|09s |10l|11i|12b|13r|14a|15r|14y |130|12.|111|07" + const char* name = "|01P|02i|03p|04e|05c|06ol|07o|08r|09s |10l|11i|12b|13r|14a|15r|14y |130|12.|111|07"; cprintf("\n%s\n\n", name); cprintf("%s\n", str);