mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Initial conversion to GNU Configure & Build System
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
# Plugin based services architecture for finit
|
||||
-include ../config.mk
|
||||
|
||||
TOPDIR ?= $(shell pwd)
|
||||
CFLAGS += -fPIC
|
||||
LDFLAGS := $(filter-out -rdynamic, $(LDFLAGS))
|
||||
LDFLAGS += -shared
|
||||
ifneq ($(STATIC), 1)
|
||||
PLUGINS ?= initctl.so alsa-utils.so bootmisc.so dbus.so hwclock.so \
|
||||
resolvconf.so urandom.so x11-common.so tty.so time.so \
|
||||
netlink.so pidfile.so
|
||||
DEPS := $(PLUGINS:.so=.d)
|
||||
endif
|
||||
|
||||
include ../common.mk
|
||||
|
||||
ifneq ($(STATIC), 1)
|
||||
all: $(PLUGINS)
|
||||
else
|
||||
all:
|
||||
@true
|
||||
endif
|
||||
|
||||
clean:
|
||||
-@$(RM) $(PLUGINS)
|
||||
|
||||
distclean:
|
||||
-@$(RM) *.o *.so $(JUNK) $(DEPS)
|
||||
|
||||
ifneq ($(STATIC), 1)
|
||||
install: all
|
||||
@install -d $(DESTDIR)$(plugindir)
|
||||
@for plugin in $(PLUGINS); do \
|
||||
echo " INSTALL $(DESTDIR)$(plugindir)/$$plugin"; \
|
||||
$(STRIPINST) $$plugin $(DESTDIR)$(plugindir)/$$plugin; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
-@for plugin in $(PLUGINS); do \
|
||||
echo " RM $(DESTDIR)$(plugindir)/$$plugin"; \
|
||||
rm $(DESTDIR)$(plugindir)/$$plugin 2>/dev/null; \
|
||||
done
|
||||
-@rmdir $(DESTDIR)$(plugindir) 2>/dev/null
|
||||
else
|
||||
install:
|
||||
@true
|
||||
uninstall:
|
||||
@true
|
||||
endif
|
||||
|
||||
ifneq ($(MAKECMDGOALS),distclean)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
@@ -0,0 +1,19 @@
|
||||
AM_LDFLAGS = -module -avoid-version -shared -no-undefined -export-dynamic
|
||||
AM_CPPFLAGS = -U_FORTIFY_SOURCE
|
||||
AM_CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
|
||||
AM_CPPFLAGS += -DFINIT_FIFO=\"$(fifo)\"
|
||||
|
||||
if STATIC
|
||||
noinst_LTLIBRARIES = libplug.la
|
||||
libplug_la_SOURCES = alsa-utils.c bootmisc.c dbus.c hwclock.c \
|
||||
initctl.c netlink.c pidfile.c resolvconf.c \
|
||||
time.c tty.c urandom.c x11-common.c
|
||||
else
|
||||
pkglib_LTLIBRARIES = alsa-utils.la bootmisc.la dbus.la hwclock.la \
|
||||
initctl.la netlink.la pidfile.la resolvconf.la \
|
||||
time.la tty.la urandom.la x11-common.la
|
||||
|
||||
# Clean up .la files installed by libtool despite being in -module mode
|
||||
install-exec-hook:
|
||||
@(cd $(DESTDIR)$(pkglibdir) && $(RM) $(pkglib_LTLIBRARIES))
|
||||
endif
|
||||
Reference in New Issue
Block a user