forked from radareorg/r2retdec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 796 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
39
40
MAKE?=make
SUDO?=sudo
PREFIX=$(shell r2 -H R2_PREFIX)
R2HOME=$(shell r2 -H R2_USER_PLUGINS)
LIBEXT=$(shell r2 -H R2_LIBEXT)
all: p
$(MAKE) -C p
asan:
rm -rf p
mkdir -p p
export CFLAGS="-g -fsanitize=address -O1" ; \
export CXXFLAGS="-g -fsanitize=address -O1" ; \
cd p && cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
cd p && make -j8
p:
mkdir -p p && cd p && cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
help: p
make -C p help
install:
$(SUDO) $(MAKE) -C p install
cp -f p/src/r2plugin/core_retdec.$(LIBEXT) $(R2HOME)
uninstall:
# TODO not implemented -$(SUDO) $(MAKE) -C p uninstall
rm -rf /usr/local/share/retdec
rm -rf /usr/local/include/retdec
rm -rf /usr/local/lib/libretdec*
rm -rf /usr/local/bin/retdec*
rm -f $(R2HOME)/core_retdec.$(LIBEXT)
clean:
mrproper:
rm -rf p