diff --git a/Makefile b/Makefile index fa3b56e..970c55c 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,22 @@ -CFLAGS=-fomit-frame-pointer -O2 -s -g -Wall -timeoutd: timeoutd.c Makefile - #$(CC) $(CFLAGS) -o timeoutd timeoutd.c - $(CC) $(CFLAGS) -o timeoutd.o -c timeoutd.c -DTIMEOUTDX11 - $(CC) $(CFLAGS) -o timeoutd -L/usr/X11R6/lib timeoutd.o -lXss -lXext - +CFLAGS = -g -Wall -install: - install -o root -g system -m 2111 timeoutd /usr/etc/timeoutd - install -o man -g info -m 444 timeoutd.8 /usr/man/man8 - install -o man -g info -m 444 timeouts.5 /usr/man/man5 +timeoutd: timeoutd.c + $(CC) $(CFLAGS) -o timeoutd.o -c timeoutd.c -DTIMEOUTDX11 + $(CC) $(CFLAGS) -o timeoutd timeoutd.o -lX11 -lXss + +clean: + -rm -f timeoutd timeoutd.o + +install: /etc/timeouts + install timeoutd /usr/sbin/timeoutd + install timeoutd.8 /usr/share/man/man8 + install timeouts.5 /usr/share/man/man5 + +uninstall: + rm /usr/sbin/timeoutd + rm /usr/share/man/man8/timeoutd.8 + rm /usr/share/man/man5/timeouts.5 + rm /etc/timeouts + +/etc/timeouts: + install timeouts /etc