Completely rewrite broken Makefile
The Makefile for the project was unable to properly build. It didn't call an X11 library which was needed for the program to link, but called various libraries which weren't necessary. It also didn't install the /etc/timeouts config file, didn't have an uninstall option, and it's install would fail, due to the fact that it used non-existent directories as install destinations, and broken user and group settings for the files. All of the afformentioned problems have been mended in this commit. It's likely that all of the problems which actually broke the program were due to a difference in Unix systems of the early 90s compared to 2020. It's likely the X11 libraries were reorganised, and the users and groups in the install command have been obsoleted.
This commit is contained in:
parent
eeeb4d4f97
commit
0bfd961a8c
27
Makefile
27
Makefile
|
@ -1,11 +1,22 @@
|
|||
CFLAGS=-fomit-frame-pointer -O2 -s -g -Wall
|
||||
timeoutd: timeoutd.c Makefile
|
||||
#$(CC) $(CFLAGS) -o timeoutd timeoutd.c
|
||||
CFLAGS = -g -Wall
|
||||
|
||||
timeoutd: timeoutd.c
|
||||
$(CC) $(CFLAGS) -o timeoutd.o -c timeoutd.c -DTIMEOUTDX11
|
||||
$(CC) $(CFLAGS) -o timeoutd -L/usr/X11R6/lib timeoutd.o -lXss -lXext
|
||||
$(CC) $(CFLAGS) -o timeoutd timeoutd.o -lX11 -lXss
|
||||
|
||||
clean:
|
||||
-rm -f timeoutd timeoutd.o
|
||||
|
||||
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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue