diff --git a/INSTALL.md b/INSTALL.md index 66b75a0..0f047b4 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -10,7 +10,7 @@ this notice are preserved. This file is offered as-is, without any warranty. ## Copy Code to Your Project -The code of ctlseqs is simple, and can be used out-of-the-box. Just copy [ctlseqs.h](src/ctlseqs.h) and [ctlseqs.c](src/ctlseqs.c) to your project and build it alongside with other code. +The code of ctlseqs is simple, and can be used out-of-the-box. Just copy [ctlseqs.h](include/ctlseqs.h) and [ctlseqs.c](src/ctlseqs.c) to your project and build it alongside with other code. Requires an ISO C99 and POSIX.1-2001 compliant C implementation. diff --git a/Makefile.am b/Makefile.am index c4dd865..0801f07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,4 +6,4 @@ # this notice are preserved. This file is offered as-is, without any warranty. # -SUBDIRS = src doc man tests examples +SUBDIRS = include src doc man tests examples diff --git a/configure.ac b/configure.ac index a6f5ffe..7af5372 100644 --- a/configure.ac +++ b/configure.ac @@ -50,5 +50,5 @@ m4_define([CTLSEQS_LT_REVISION], [0]) m4_define([CTLSEQS_LT_AGE], [0]) AC_SUBST([CTLSEQS_LT_VERSION], [CTLSEQS_LT_CURRENT:CTLSEQS_LT_REVISION:CTLSEQS_LT_AGE]) -AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile src/Makefile tests/Makefile examples/Makefile]) +AC_CONFIG_FILES([Makefile include/Makefile doc/Makefile man/Makefile src/Makefile tests/Makefile examples/Makefile]) AC_OUTPUT diff --git a/examples/Makefile.am b/examples/Makefile.am index 8216e76..73e7a34 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -6,7 +6,8 @@ # this notice are preserved. This file is offered as-is, without any warranty. # -AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CPPFLAGS = -I$(top_srcdir)/include + noinst_PROGRAMS = sixdraw sixdraw_SOURCES = sixdraw.c sixdraw_LDADD = $(top_srcdir)/src/libctlseqs.la diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..3ee6311 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,9 @@ +# +# Copyright (C) 2021 CismonX +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty, provided the copyright notice and +# this notice are preserved. This file is offered as-is, without any warranty. +# + +include_HEADERS = ctlseqs.h diff --git a/src/ctlseqs.h b/include/ctlseqs.h similarity index 100% rename from src/ctlseqs.h rename to include/ctlseqs.h diff --git a/src/Makefile.am b/src/Makefile.am index 2e72f2e..ad53c1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,8 +6,8 @@ # this notice are preserved. This file is offered as-is, without any warranty. # +AM_CPPFLAGS = -I$(top_srcdir)/include +AM_LDFLAGS = -version-info $(CTLSEQS_LT_VERSION) + lib_LTLIBRARIES = libctlseqs.la libctlseqs_la_SOURCES = ctlseqs.c -libctlseqs_la_LDFLAGS = -version-info $(CTLSEQS_LT_VERSION) - -include_HEADERS = ctlseqs.h diff --git a/tests/Makefile.am b/tests/Makefile.am index 0719ceb..becf8e1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,7 +7,7 @@ # AUTOMAKE_OPTIONS = dejagnu -AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CPPFLAGS = -I$(top_srcdir)/include noinst_PROGRAMS = tcsgrep tcsgrep_SOURCES = tcsgrep.c