-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
36 lines (27 loc) · 1013 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
VERSION = v$(shell git describe --dirty 2>/dev/null || echo 1.06)
CPPFLAGS += -DVERSION=\"$(VERSION)\"
PROGS = bin2ecm bincomp brrrip byteshuf cdpatch fakecrc hax65816 \
pecompat rels screamf uips vb2rip wordadd
.PHONY: all clean install
.SUFFIXES: .txt .1
all: $(PROGS)
clean:
rm -f $(PROGS) *.1
.txt.1:
a2x -f manpage $*.txt
prefix?=/usr/local
bindir?=/bin
mandir?=/share/man
target=$(DESTDIR)$(prefix)
install-%: % %.1
install -D $< -t "$(target)$(bindir)"
install -Dm644 $<.1 -t "$(target)$(mandir)/man1"
install-bin2ecm: bin2ecm bin2ecm.1
install -D bin2ecm -t "$(target)$(bindir)"
install -Dm644 bin2ecm.1 -t "$(target)$(mandir)/man1"
ln -fs bin2ecm "$(target)$(bindir)/ecm2bin"
ln -fs bin2ecm.1 "$(target)$(mandir)/man1/ecm2bin.1"
install: install-bin2ecm install-bincomp install-brrrip \
install-byteshuf install-cdpatch install-fakecrc \
install-hax65816 install-pecompat install-rels \
install-screamf install-uips install-vb2rip install-wordadd