# a gnu-make-ism VERSION:=$(shell cat Version) PROG=fallback-reboot SRCS=$(PROG).c OBJS=$(PROG).o CC=gcc -D_FORTIFY_SOURCE=2 CFLAGS=-ansi -pedantic -Wall \ -DVERSION=\"$(VERSION)\" \ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_OPENSSL_EVP_H=1 -DPRNGDPORT=708 -DFBRPORT=3002 LIBS= -lnsl -lcrypto .PHONY: all all: $(PROG) lint README lint: ./this-pylint --which-2 None --to-pylint fallback-reboot-client pycodestyle --max-line-length 132 fallback-reboot-client pydocstyle fallback-reboot-client $(PROG): $(SRCS) Makefile rm -f $(PROG) $(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS) README: README.in Makefile sed 's/VERSION/$(VERSION)/' < README.in > README go: $(PROG) ./fallback-reboot-client localhost 3002 #./$(PROG) install: $(PROG) @echo ./install-rc-script # create our sbin directory, and all parent directories as required mkdir -p /usr/local/sbin rm -f /usr/local/sbin/fallback-reboot cp $(PROG) /usr/local/sbin/. cp gen-pas /usr/local/sbin/. chmod 755 gen-pas chmod 755 /usr/local/sbin/$(PROG) /usr/local/sbin/gen-pas chown root /usr/local/sbin/$(PROG) /usr/local/sbin/gen-pas cp fallback-reboot-client /usr/local/sbin/. chmod 755 /usr/local/sbin/fallback-reboot-client /usr/local/sbin/gen-pas chown root /usr/local/sbin/fallback-reboot-client ./install-bufsock @echo @echo Please be sure to create a fallback-reboot password by either @echo using gen-pas, running S22fallback-reboot or rebooting. Also, @echo be sure to copy that password to another system that is not @echo dependent on this one, so you will have the password when you @echo 'actually need it! :)' clean: rm -f *.o $(PROG) README core rm -f configure.lineno rm -f found-dir pristine: clean rm -rf autom4te.cache config.status *.pyc confdefs.h conftest.c rm -rf config.log configure.lineno Makefile runlevel rm -rf found-dir rm -f Makefile rm -f configure.lineno rm -f Makefile rm -f S22fallback-reboot .PHONY: web web: pristine README (echo '
'; sed 's/^-----$$/') > $(HOME)/public_html/fallback-reboot/README.html rm README tar cvf - . | gzip -9 > $(HOME)/public_html/fallback-reboot/fallback-reboot.tar.gz
/' < README; echo '