X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=Makefile.am;h=54f414a7508894859793956c5a393d92d07f8250;hb=ae446765eb0605d2451bb4dd7c336672bcc7ab0c;hp=445cc1e37e35d7c11186809bc8d2769ff7544929;hpb=74b91131ed09850ed487a2f7849147ff6f80194d;p=elogind.git diff --git a/Makefile.am b/Makefile.am index 445cc1e37..54f414a75 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,10 @@ LIBSYSTEMD_LOGIN_CURRENT=0 LIBSYSTEMD_LOGIN_REVISION=0 LIBSYSTEMD_LOGIN_AGE=0 +LIBSYSTEMD_DAEMON_CURRENT=0 +LIBSYSTEMD_DAEMON_REVISION=0 +LIBSYSTEMD_DAEMON_AGE=0 + # Dirs of external packages dbuspolicydir=@dbuspolicydir@ dbussessionservicedir=@dbussessionservicedir@ @@ -189,10 +193,12 @@ systemgenerator_PROGRAMS += \ endif lib_LTLIBRARIES = \ - libsystemd-login.la + libsystemd-daemon.la \ + libsystemd-login.la pkginclude_HEADERS = \ - src/sd-login.h + src/sd-daemon.h \ + src/sd-login.h noinst_PROGRAMS = \ test-engine \ @@ -422,6 +428,7 @@ EXTRA_DIST = \ units/quotacheck.service.in \ units/user@.service.in \ systemd.pc.in \ + libsystemd-daemon.pc.in \ libsystemd-login.pc.in \ introspect.awk \ src/73-seat-late.rules.in @@ -486,6 +493,7 @@ dist_doc_DATA = \ pkgconfigdata_DATA = \ systemd.pc \ + libsystemd-daemon.pc \ libsystemd-login.pc # Passed through intltool only @@ -511,8 +519,7 @@ EXTRA_DIST += \ noinst_LTLIBRARIES = \ libsystemd-basic.la \ - libsystemd-core.la \ - libsystemd-daemon.la + libsystemd-core.la libsystemd_basic_la_SOURCES = \ src/util.c \ @@ -601,9 +608,6 @@ libsystemd_core_la_LIBADD = \ $(PAM_LIBS) \ $(AUDIT_LIBS) -libsystemd_daemon_la_SOURCES = \ - src/sd-daemon.c - # This is needed because automake is buggy in how it generates the # rules for C programs, but not Vala programs. We therefore can't # list the .h files as dependencies if we want make dist to work. @@ -1364,18 +1368,45 @@ pam_systemd_la_LIBADD = \ $(PAM_LIBS) \ $(DBUS_LIBS) -libsystemd_login_la_CFLAGS = \ +libsystemd_daemon_la_SOURCES = \ + src/sd-daemon.c + +libsystemd_daemon_la_CFLAGS = \ $(AM_CFLAGS) \ - -fvisibility=hidden + -fvisibility=hidden \ + -DSD_EXPORT_SYMBOLS -libsystemd_login_la_LDFLAGS = \ +libsystemd_daemon_la_LDFLAGS = \ -shared \ - -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) + -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \ + -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym + +# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed +libsystemd-daemon-install-hook: + if test "$(libdir)" != "$(rootlibdir)"; then \ + mkdir -p $(DESTDIR)$(rootlibdir) && \ + so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \ + so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \ + ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \ + mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \ + fi + +libsystemd-daemon-uninstall-hook: + rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so* libsystemd_login_la_SOURCES = \ src/sd-login.c \ src/cgroup-util.c +libsystemd_login_la_CFLAGS = \ + $(AM_CFLAGS) \ + -fvisibility=hidden + +libsystemd_login_la_LDFLAGS = \ + -shared \ + -version-info $(LIBSYSTEMD_LOGIN_CURRENT):$(LIBSYSTEMD_LOGIN_REVISION):$(LIBSYSTEMD_LOGIN_AGE) \ + -Wl,--version-script=$(top_srcdir)/src/libsystemd-login.sym + libsystemd_login_la_LIBADD = \ libsystemd-basic.la @@ -1512,22 +1543,22 @@ endif DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h org.freedesktop.systemd1.%.xml: systemd - $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \ + $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \ $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \ $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp org.freedesktop.hostname1.xml: systemd-hostnamed - $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \ + $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.hostname1 $< $@.tmp && \ $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \ $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp org.freedesktop.locale1.xml: systemd-localed - $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \ + $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.locale1 $< $@.tmp && \ $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \ $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp org.freedesktop.timedate1.xml: systemd-timedated - $(AM_V_GEN)$(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \ + $(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \ $(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \ $(DBUS_PREPROCESS) -o $@ - && rm $@.tmp @@ -1791,6 +1822,10 @@ if HAVE_SYSV_COMPAT $(LN_S) ../var-lock.mount var-lock.mount ) endif +install-exec-hook: libsystemd-daemon-install-hook + +uninstall-hook: libsystemd-daemon-uninstall-hook + DISTCHECK_CONFIGURE_FLAGS = \ --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \ --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \