blob: 06bf4ff107a1c42e7fb22fd5beba0c4f08f7af96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
CFLAGS = -Wall -Wextra -pedantic -O2
prefix = /usr/local
all: bin/host
bin/%: src/%.c
mkdir -p bin
$(CC) $(CFLAGS) -o $@ $<
install: bin/host
mkdir -p $(prefix)/bin $(prefix)/share/man/man1
cp bin/host $(prefix)/bin/host
cp man/1/host $(prefix)/share/man/man1/host.1
chmod 755 $(prefix)/bin/host
chmod 644 $(prefix)/share/man/man1/host.1
uninstall:
rm -f $(prefix)/bin/host
rm -f $(prefix)/share/man/man1/host.1
clean:
rm -f bin/host
.PHONY: all install uninstall clean
|