X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2FMakefile.am;h=4bbc3fb582c04be5ff665bd521dac1698d68bf02;hp=e4695cdac476a4bf1ff779e8296e1db622ef4012;hb=ddb933096618a6bceded29e4dc2b37cb72134366;hpb=2df0d2d5c79582e1dce5cdedede9ac564a6f126b diff --git a/src/Makefile.am b/src/Makefile.am index e4695cd..4bbc3fb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,13 +6,12 @@ AM_CPPFLAGS += -DSYSCONFDIR='"${sysconfdir}"' AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"' AM_CPPFLAGS += -DPKGLIBDIR='"${pkglibdir}"' -BUILT_SOURCES = include/sysdb.h +BUILT_SOURCES = include/client/sysdb.h include/sysdb.h pkginclude_HEADERS = include/sysdb.h pkgcoreincludedir = $(pkgincludedir)/core pkgcoreinclude_HEADERS = \ include/core/data.h \ - include/core/error.h \ include/core/object.h \ include/core/plugin.h \ include/core/store.h \ @@ -20,17 +19,34 @@ pkgcoreinclude_HEADERS = \ pkgfeincludedir = $(pkgincludedir)/frontend pkgfeinclude_HEADERS = \ include/frontend/connection.h \ + include/frontend/proto.h \ include/frontend/sock.h pkgutilsincludedir = $(pkgincludedir)/utils pkgutilsinclude_HEADERS = \ include/utils/channel.h \ include/utils/dbi.h \ + include/utils/error.h \ include/utils/llist.h \ include/utils/proto.h \ include/utils/strbuf.h \ include/utils/unixsock.h -lib_LTLIBRARIES = libsysdb.la +pkgclientincludedir = $(pkgincludedir)/client +pkgclientinclude_HEADERS = \ + include/client/sock.h \ + include/client/sysdb.h + +lib_LTLIBRARIES = libsysdbclient.la libsysdb.la + +libsysdbclient_la_SOURCES = \ + client/client.c include/client/sysdb.h \ + client/sock.c include/client/sock.h \ + utils/proto.c include/utils/proto.h \ + utils/strbuf.c include/utils/strbuf.h +libsysdbclient_la_CFLAGS = $(AM_CFLAGS) +libsysdbclient_la_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) +libsysdbclient_la_LDFLAGS = -version-info 0:0:0 -pthread +libsysdbclient_la_LIBADD = $(LIBLTDL) libsysdb_la_SOURCES = \ sysdb.c include/sysdb.h \ @@ -38,13 +54,13 @@ libsysdb_la_SOURCES = \ core/plugin.c include/core/plugin.h \ core/store.c include/core/store.h \ include/core/data.h \ - core/error.c include/core/error.h \ frontend/connection.c include/frontend/connection.h \ include/frontend/connection-private.h \ frontend/sock.c include/frontend/sock.h \ frontend/session.c \ frontend/query.c \ utils/channel.c include/utils/channel.h \ + utils/error.c include/utils/error.h \ utils/llist.c include/utils/llist.h \ utils/proto.c include/utils/proto.h \ utils/strbuf.c include/utils/strbuf.h \ @@ -62,7 +78,11 @@ libsysdb_la_SOURCES += \ libsysdb_la_LIBADD += -ldbi endif -bin_PROGRAMS = sysdbd +bin_PROGRAMS = sysdb sysdbd + +sysdb_SOURCES = client/sysdb.c include/client/sysdb.h +sysdb_CFLAGS = $(AM_CFLAGS) -DBUILD_DATE="\"$$( date --utc '+%F %T' ) (UTC)\"" +sysdb_LDADD = libsysdbclient.la sysdbd_SOURCES = daemon/sysdbd.c include/sysdb.h \ daemon/config.c include/daemon/config.h @@ -124,6 +144,15 @@ libsysdb_la_LIBADD += -dlopen plugins/cname/dns.la libsysdb_la_DEPENDENCIES += plugins/cname/dns.la endif +include/client/sysdb.h: include/client/sysdb.h.in ../version + source ../version; sed \ + -e "s/@SDB_VERSION_MAJOR@/$$VERSION_MAJOR/g" \ + -e "s/@SDB_VERSION_MINOR@/$$VERSION_MINOR/g" \ + -e "s/@SDB_VERSION_PATCH@/$$VERSION_PATCH/g" \ + -e "s/@SDB_VERSION_EXTRA@/$$VERSION_EXTRA/g" \ + -e "s/@SDB_VERSION_STRING@/$$VERSION_STRING/g" \ + include/client/sysdb.h.in > include/client/sysdb.h + include/sysdb.h: include/sysdb.h.in ../version source ../version; sed \ -e "s/@SDB_VERSION_MAJOR@/$$VERSION_MAJOR/g" \