forked from cetus9/u8_r2_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 817 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
# Work around 'user' r2 installation...
#prefix=/home/$$USER/bin/prefix/radare2
#exec_prefix=${prefix}
#libdir=/home/$$USER/bin/prefix/radare2/lib
#includedir=${prefix}/include
#CFLAGS=-g -fPIC -I${includedir}/libr
#ARCH_LDFLAGS=-shared -L${libdir} -lr_anal
# ...or use pkg-config if installed normally
CFLAGS=-g -fPIC $(shell pkg-config --cflags r_asm)
ARCH_LDFLAGS=-shared $(shell pkg-config --libs r_anal)
ARCH_OBJS=arch_u8.o u8_inst.o u8_disas.o
R2_PLUGIN_PATH=$(shell r2 -H R2_USER_PLUGINS)
LIBEXT=$(shell r2 -H LIBEXT)
ARCH_LIB=arch_u8.$(LIBEXT)
all: $(ARCH_LIB) install
clean:
rm -f $(ARCH_LIB) $(ARCH_OBJS)
$(ARCH_LIB): $(ARCH_OBJS)
$(CC) $(CFLAGS) -o $(ARCH_LIB) $(ARCH_OBJS) $(ARCH_LDFLAGS)
install:
cp -f arch_u8.$(LIBEXT) $(R2_PLUGIN_PATH)
uninstall:
rm -f $(R2_PLUGIN_PATH)/arch_u8.$(LIBEXT)