# sysv-wrapper Makefile. # # Build: make # Install: make install DESTDIR= (defaults to /) # Clean: make clean # # Installs the wrapper at /sbin/sysv-wrapper and symlinks the legacy # tool names to it. /sbin/init is NOT symlinked here — that path is # the zyginit daemon binary. If you want sysv-wrapper to handle # `init ` too, move zyginit aside (e.g. to /sbin/zyginit) and # symlink /sbin/init -> sysv-wrapper instead. CC ?= gcc CFLAGS ?= -O2 -Wall DESTDIR ?= SBIN = $(DESTDIR)/sbin WRAPPER = $(SBIN)/sysv-wrapper all: sysv-wrapper sysv-wrapper: wrapper.c version.h $(CC) $(CFLAGS) -o $@ wrapper.c install: sysv-wrapper install -d $(SBIN) install -m 0755 sysv-wrapper $(WRAPPER) ln -sf sysv-wrapper $(SBIN)/halt ln -sf sysv-wrapper $(SBIN)/reboot ln -sf sysv-wrapper $(SBIN)/poweroff ln -sf sysv-wrapper $(SBIN)/telinit clean: rm -f sysv-wrapper .PHONY: all install clean