diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-21 11:17:43 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-21 21:42:30 +0100 |
commit | 71af650760c2b75b3c267277f47d8ba235421300 (patch) | |
tree | 28f5680611c8b1922b6386cdff59c63ed3d2aad5 /daemons | |
parent | 7832d3566868408ebf6d4c5d708e3efab3d48a67 (diff) | |
download | lvm2-71af650760c2b75b3c267277f47d8ba235421300.tar.gz |
lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT
Build with configured NOTIFYDBUS_SUPPORT, SYSTEMD_LIBS, SYSTEMD_CFLAGS.
Also add proper build dependencies on internal libraries.
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/lvmlockd/Makefile.in | 21 | ||||
-rw-r--r-- | daemons/lvmlockd/lvmlockd-core.c | 2 |
2 files changed, 8 insertions, 15 deletions
diff --git a/daemons/lvmlockd/Makefile.in b/daemons/lvmlockd/Makefile.in index 17fcb4002..3ca416710 100644 --- a/daemons/lvmlockd/Makefile.in +++ b/daemons/lvmlockd/Makefile.in @@ -37,25 +37,18 @@ TARGETS = lvmlockd lvmlockctl include $(top_builddir)/make.tmpl -CFLAGS += $(EXTRA_EXEC_CFLAGS) +CFLAGS += $(EXTRA_EXEC_CFLAGS) $(SYSTEMD_CFLAGS) INCLUDES += -I$(top_srcdir)/libdaemon/server -LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -LIBS += $(RT_LIBS) $(DAEMON_LIBS) $(PTHREAD_LIBS) +LDFLAGS += $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) +LIBS += $(PTHREAD_LIBS) $(SYSTEMD_LIBS) - -ifeq ($(USE_SD_NOTIFY),yes) - CFLAGS += $(shell pkg-config --cflags libsystemd) -DUSE_SD_NOTIFY - LIBS += $(shell pkg-config --libs libsystemd) -endif - -lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ - $(top_builddir)/libdaemon/server/libdaemonserver.a +lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/server/libdaemonserver.a $(INTERNAL_LIBS) @echo " [CC] $@" - $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LOCK_LIBS) -ldaemonserver $(INTERNAL_LIBS) $(LIBS) + $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LOCK_LIBS) $(LIBS) -lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a +lvmlockctl: lvmlockctl.o $(INTERNAL_LIBS) @echo " [CC] $@" - $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmlockctl.o $(INTERNAL_LIBS) $(LIBS) + $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS) install_lvmlockd: lvmlockd @echo " [INSTALL] $<" diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index dd5227034..1c58d4dce 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -34,7 +34,7 @@ #include <sys/utsname.h> #include <sys/un.h> -#ifdef USE_SD_NOTIFY +#ifdef NOTIFYDBUS_SUPPORT #include <systemd/sd-daemon.h> #endif |