From 71af650760c2b75b3c267277f47d8ba235421300 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 21 Dec 2018 11:17:43 +0100 Subject: [PATCH] lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT Build with configured NOTIFYDBUS_SUPPORT, SYSTEMD_LIBS, SYSTEMD_CFLAGS. Also add proper build dependencies on internal libraries. --- daemons/lvmlockd/Makefile.in | 21 +++++++-------------- 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 #include -#ifdef USE_SD_NOTIFY +#ifdef NOTIFYDBUS_SUPPORT #include #endif