Created
June 12, 2014 06:19
-
-
Save azilber/083050a94c1933d8dfef to your computer and use it in GitHub Desktop.
sshutout Makefile for ubuntu (works n 14.x)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
WARNINGS = -Wall | |
COMPILE = -pipe -O2 | |
#DEBUG = -ggdb | |
LD_OPT = -s | |
CFLAGS = $(DEBUG) $(WARNINGS) $(COMPILE) | |
SRCS = sshutout.c | |
OBJS = $(SRCS:.c=.o) | |
sshutout: $(SRCS) $(OBJS) $(HEADERS) | |
$(CC) $(CFLAGS) $(LD_OPT) -o $@ $(OBJS) | |
install: sshutout | |
cp sshutout /usr/local/sbin/sshutout | |
chown root:root /usr/local/sbin/sshutout | |
chmod 755 /usr/local/sbin/sshutout | |
if [ -r /etc/sshutout.conf ]; then mv /etc/sshutout.conf /etc/sshutout.conf~; fi | |
cp sshutout.conf /etc/sshutout.conf | |
chown root:root /etc/sshutout.conf | |
chmod 640 /etc/sshutout.conf | |
if [ ! -d /usr/share/man/man8 ]; then mkdir -m 755 /usr/share/man/man8; fi | |
cp sshutout.8 /usr/share/man/man8/sshutout.8 | |
chown root:root /usr/share/man/man8/sshutout.8 | |
chmod 644 /usr/share/man/man8/sshutout.8 | |
clean: | |
rm -f $(OBJS) sshutout core |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment