debian: Replace Debian build system with CDBS.
[mLib] / Makefile.am
index 4437953..131a94c 100644 (file)
 ## it under the terms of the GNU Library General Public License as
 ## published by the Free Software Foundation; either version 2 of the
 ## License, or (at your option) any later version.
-## 
+##
 ## mLib is distributed in the hope that it will be useful,
 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ## GNU Library General Public License for more details.
-## 
+##
 ## You should have received a copy of the GNU Library General Public
 ## License along with mLib; if not, write to the Free
 ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
@@ -33,13 +33,13 @@ AUTOMAKE_OPTIONS = foreign
 ## --- What to build ---
 
 SUBDIRS = man
-
-bin_SCRIPTS = mLib-config
 bin_PROGRAMS = crc-mktab unihash-mkstatic
 
 lib_LTLIBRARIES = libmLib.la
 pkglibexecdir = $(libexecdir)/$(PACKAGE)
 pkglibexec_PROGRAMS = @BRES_LIBEXEC@
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = mLib.pc
 EXTRA_PROGRAMS = bres
 
 pkginclude_HEADERS = \
@@ -48,6 +48,7 @@ pkginclude_HEADERS = \
        trace.h track.h unihash.h \
        pool.h \
        atom.h assoc.h darray.h dstr.h dspool.h hash.h sym.h crc32.h \
+       daemonize.h versioncmp.h \
        env.h fdflags.h fdpass.h fwatch.h lock.h \
        bres.h conn.h lbuf.h ident.h pkbuf.h sel.h selbuf.h selpk.h sig.h \
        tv.h \
@@ -55,7 +56,7 @@ pkginclude_HEADERS = \
 
 ## --- Things to put in the library ---
 
-libmLib_la_LDFLAGS = -version-info 2:3:0
+libmLib_la_LDFLAGS = -version-info 2:5:0
 ## Middle number is the patchlevel.  Final number is the minor version.  The
 ## difference between the first and last numbers is major version.
 
@@ -67,6 +68,7 @@ libmLib_la_SOURCES = \
          sym.c \
        crc32.c crc32-tab.c \
        unihash.c unihash-global.c \
+       daemonize.c versioncmp.c \
        env.c fdflags.c fdpass.c fwatch.c lock.c \
        @BRES_SOURCE@.c \
        conn.c lbuf.c ident.c pkbuf.c sel.c selbuf.c selpk.c sig.c \
@@ -99,11 +101,11 @@ unihash_mkstatic_CFLAGS = $(AM_CFLAGS)
 
 ## --- Test code ---
 
-noinst_PROGRAMS = da.t sym.t assoc.t bits.t
+noinst_PROGRAMS = da.t sym.t assoc.t bits.t versioncmp.t
 
 check: \
        da.test sym.test assoc.test bits.test base64.test hex.test \
-       base32.test \
+       base32.test versioncmp.test \
        unihash.test
 
 da_t_SOURCES = da-test.c
@@ -150,6 +152,14 @@ bits.o: bits.c
 bits.test: bits.t
        ./bits.t -f $(srcdir)/bits.in
 
+versioncmp_t_SOURCES = versioncmp-test.c
+versioncmp_t_LDADD = libmLib.la
+versioncmp_t_LDFLAGS = -static
+versioncmp-test.o: versioncmp-test.c
+       $(COMPILE) -c -DSRCDIR="\"$(srcdir)\"" $(srcdir)/versioncmp-test.c -o $@
+versioncmp.test: versioncmp.t
+       ./versioncmp.t -f $(srcdir)/versioncmp.in
+
 base64.to: base64.c
        $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" \
                $(srcdir)/base64.c -o base64.to
@@ -212,6 +222,7 @@ TEST_DIST = \
        sym-gtest sym-ref \
        bits.in bits-testgen.c \
        unihash-check.pl unihash.in \
+       versioncmp.in \
        base64.in base64.ref base32.in base32.ref hex.in hex.ref
 
 ## --- Background resolver ---
@@ -235,7 +246,7 @@ uninstall-man:
 CLEANFILES = $(TEST_CLEAN) crc32-tab.c unihash-global.c
 DISTCLEANFILES = libtool
 EXTRA_DIST = \
-       $(TEST_DIST) maninst \
+       $(TEST_DIST) config/maninst \
        debian/rules debian/copyright debian/control debian/changelog
 
 ##----- That's all, folks ---------------------------------------------------