-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
65 lines (50 loc) · 1.71 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
-include config.mk
DESTDIR?=
GHIDRA_NATIVE_COMMIT=0.2.5
ifeq ($(shell test -f config.mk && echo $$?),0)
all: ghidra-native ghidra-processors.txt
$(MAKE) -C src
$(MAKE) -C ghidra
else
all:
@echo Run ./configure
endif
c:
make -C src -j4
purge: clean
$(MAKE) uninstall
$(MAKE) user-uninstall
ghidra-processors.txt:
cp -f ghidra-processors.txt.default ghidra-processors.txt
asan: ghidra-native ghidra-processors.txt
$(MAKE) -C src asan CFLAGS=-g CXXFLAGS=-g
asan-run:
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib r2 -s 9664 /Users/pancake/Downloads/usr-4/bin/bc
help:
@echo
@echo "./configure # first you need to run configure"
@echo "make # build r2ghidra plugins"
@echo "make install # install plugin and sleighs into prefix"
@echo "make uninstall # uninstall r2ghidra from prefix (see user-uninstall)"
@echo "make user-install # install in your home"
@echo "make user-uninstall # uninstall r2ghidra from prefix (see user-uninstall)"
@echo
clean:
$(MAKE) -C src clean
$(MAKE) -C ghidra clean
rm -f config.mk
install uninstall user-install user-uninstall:
$(MAKE) -C src $@
$(MAKE) -C ghidra $@
ghidra-native:
git clone https://github.com/radareorg/ghidra-native
cd ghidra-native && git checkout $(GHIDRA_NATIVE_COMMIT)
$(MAKE) -C ghidra-native patch
mrproper: clean
git submodule deinit --all -f
r2ghidra_sleigh.zip dist:
rm -rf tmp && mkdir -p tmp
$(MAKE) -C ghidra user-install DH=$(shell pwd)/tmp/r2ghidra_sleigh-$(VERSION)
cd tmp && zip -r ../r2ghidra_sleigh-$(VERSION).zip *
rm -rf tmp
.PHONY: mrproper clean install uninstall all dist