forked from aaSSfxxx/r2-regressions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
106 lines (82 loc) · 2.09 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
VERSION=3.4.0
DESTDIR?=/
PREFIX?=/usr/local
BINDIR=$(DESTDIR)/$(PREFIX)/bin
PWD=$(shell pwd)
PKG=radare2-regressions
TAR=tar -cvf
TAREXT=tar.xz
CZ=xz -f
TDIRS=$(shell ls -d t*| grep -v tmp) bins
LIBDIR=$(DESTDIR)/$(PREFIX)/lib
-include config.mk
all:
-$(MAKE) overlay-apply
$(MAKE) alltargets
apply-overlay overlay-apply:
$(SHELL) overlay.sh apply
alltargets: js-tests unit_tests
js-tests:
cd new && npm install
cd new && node bin/r2r.js
keystone:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/x86.ks_
swf:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/swf
m68k-extras:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/m68k
mc6809:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/x86.udis
udis86:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/mc6809
olly-extras:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/x86.olly
dwarf:
cd new && npm install
cd new && node bin/r2r.js db/extras/asm/dwarf
broken:
grep BROKEN=1 t -r -l
clean:
rm -rf tmp
symstall:
mkdir -p $(BINDIR)
chmod +x r2-v r2r
ln -fs $(PWD)/r2-v $(BINDIR)/r2-v
ln -fs $(PWD)/r2r $(BINDIR)/r2r
install:
mkdir -p $(BINDIR)
sed -e 's,@R2RDIR@,$(LIBDIR)/radare2-regressions,g' < $(PWD)/r2-v > $(BINDIR)/r2-v
sed -e 's,@R2RDIR@,$(LIBDIR)/radare2-regressions,g' < $(PWD)/r2r > $(BINDIR)/r2r
chmod +x $(BINDIR)/r2-v
chmod +x $(BINDIR)/r2r
mkdir -p $(LIBDIR)/radare2-regressions
cp -rf $(TDIRS) $(LIBDIR)/radare2-regressions
cp -rf *.sh $(LIBDIR)/radare2-regressions
uninstall:
rm -f $(BINDIR)/r2r
rm -f $(BINDIR)/r2-v
rm -rf $(LIBDIR)/radare2-regressions
unit_tests:
@make -C ./unit all
@./run_unit.sh
tested:
@grep -re FILE= t* | cut -d : -f 2- | sed -e 's/^.*bins\///g' |sort -u | grep -v FILE
untested:
@${MAKE} -s tested > .a
@${MAKE} -s allbins > .b
@diff -ru .a .b | grep ^+ | grep -v +++ | cut -c 2-
@rm -f .a .b
allbins:
find bins -type f
dist:
git clone . $(PKG)-$(VERSION)
rm -rf $(PKG)-$(VERSION)/.git
$(TAR) "$(PKG)-${VERSION}.tar" "$(PKG)-$(VERSION)"
${CZ} "$(PKG)-${VERSION}.tar"
.PHONY: all clean allbins dist