Files
finit/plugins/Makefile
T
Joachim Nilsson 2b2fcb740c Fix installation paths and update README on building, bump version
The installation path for plugins was encoded wrong in the finit binary
if *not* unset, i.e., "prefix=".

Updated the README with information on all build related environment
variables.  Much of it is perhaps only needed for packagers and
distributions.

New version bump, v1.2 already.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2012-09-27 09:33:55 +02:00

36 lines
891 B
Makefile

# Plugin based services architecture for finit -*-Makefile-*-
CFLAGS = -fPIC -g -Os
CPPFLAGS += -I..
LDFLAGS = -shared
PLUGINS ?= initctl.so alsa-utils.so bootmisc.so dbus.so hwclock.so \
resolvconf.so urandom.so x11-common.so
DEPS = $(addprefix .,$(PLUGINS:.so=.d))
include ../common.mk
all: $(PLUGINS)
clean:
-@$(RM) $(PLUGINS) *.o
distclean: clean
-@$(RM) $(JUNK) $(DEPS)
install: all
@install -d $(DESTDIR)$(prefix)$(PLUGIN_DIR)
@for plugin in $(PLUGINS); do \
echo " INSTALL $(DESTDIR)$(prefix)$(PLUGIN_DIR)/$$plugin"; \
cp $$plugin $(DESTDIR)$(prefix)$(PLUGIN_DIR); \
done
uninstall:
-@for plugin in $(PLUGINS); do \
echo " RM $(PLUGIN_DIR)/$$plugin"; \
rm $(DESTDIR)$(prefix)$(PLUGIN_DIR)/$$plugin 2>/dev/null; \
done
-@rmdir $(DESTDIR)$(prefix)$(PLUGIN_DIR) 2>/dev/null
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPS)
endif