-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (27 loc) · 970 Bytes
/
Makefile
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
32
33
34
35
36
37
38
target ?= efsextract
objects := asprintf.o efsextract.o efs.o hexdump.o pdscan.o progname.o tar.o
libs:=libiso9660
EXTRAS = -fsanitize=bounds -fsanitize=undefined -fsanitize=null -fcf-protection=full -fstack-protector-all -fstack-check -Wimplicit-fallthrough -Wall -Wc90-c99-compat
#ifdef libs
#LDLIBS += $(shell pkg-config --libs ${libs})
#CFLAGS += $(shell pkg-config --cflags ${libs})
#endif
LDLIBS += -liso9660 -lcdio -lm
LDFLAGS += ${EXTRAS}
CFLAGS = -std=gnu99 -Wall -ggdb ${EXTRAS}
.PHONY: all
all: $(target) README
.PHONY: clean
clean:
rm -f $(target) $(objects)
.PHONY: install
install: ${target} ${target}.1
install -m 755 ${target} /usr/local/bin
install -m 755 -d /usr/local/share/man/man1
install -m 644 ${target}.1 /usr/local/share/man/man1
.PHONY: uninstall
uninstall:
rm -f /usr/local/bin/${target} /usr/local/share/man/man1/${target}.1
README: ${target}.1
MANWIDTH=77 man --nh --nj ./${target}.1 | col -b > $@
$(target): $(objects)