aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 383a9158ca786611a69be7ee2c5df3d680e7b870 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)


all: sleeping-getty

.c.o:
	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)

sleeping-getty: sleeping-getty.o
	$(CC) -o $@ sleeping-getty.o $(LDFLAGS)

install: sleeping-getty
	mkdir -p -- "$(DESTDIR)$(PREFIX)/sbin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man8"
	cp -- sleeping-getty "$(DESTDIR)$(PREFIX)/sbin/"
	cp -- sleeping-getty.8 "$(DESTDIR)$(MANPREFIX)/man8/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/sbin/sleeping-getty"
	-rm -f -- "$(DESTDIR)$(MANPREFIX)/man8/sleeping-getty.8"

clean:
	-rm -f -- sleeping-getty *.o *.su

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean