mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
- Makefile fixes for installation, paths encoded wrong - Strip binaries + .so files, support for $(CROSS) toolchain strip - Default install is now to /sbin/finit and /usr/ - Use the 'plugindir' environemnt variable instead of 'PLUGIN_DIR' Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
36 lines
870 B
Makefile
36 lines
870 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)$(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
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
-include $(DEPS)
|
|
endif
|