-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 592 Bytes
/
Makefile
File metadata and controls
26 lines (20 loc) · 592 Bytes
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
CFLAGS += -std=c99 -Wall -Wextra -pedantic -Wold-style-declaration
PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin
MANPREFIX ?= $(PREFIX)/man
CC ?= gcc
all: kfc
kfc: kfc.c Makefile
$(CC) -O3 $(CFLAGS) -o $@ $< $(LDFLAGS)
install: all
install -Dm755 kfc $(DESTDIR)$(BINDIR)/kfc
install -Dm644 kfc.1 $(DESTDIR)$(MANPREFIX)/man1/kfc.1
mkdir -p $(DESTDIR)/usr/share/kfc
cp -r palettes $(DESTDIR)/usr/share/kfc
uninstall:
rm -f $(DESTDIR)$(BINDIR)/kfc
rm -rf $(DESTDIR)/usr/share/kfc
rm -f $(DESTDIR)$(MANPREFIX)/man1/kfc.1
clean:
rm -f kfc *.o
.PHONY: all install uninstall clean