Files

32 lines
669 B
Makefile
Raw Permalink Normal View History

CC ?= cc
CFLAGS ?= -Wall -Wextra -O2 -fPIC
LDFLAGS ?=
R2_PLUGINS := $(shell r2 -H R2_USER_PLUGINS)
R2_INCDIR := $(shell r2 -H R2_INCDIR)
R2_LIBDIR := $(shell r2 -H R2_LIBDIR)
CPPFLAGS += -I$(R2_INCDIR) -I$(R2_INCDIR)/sdb
2026-04-12 14:28:20 +00:00
all: asm_adsp219x.so
2026-04-12 14:28:20 +00:00
asm_adsp219x.so: asm_adsp219x.c
$(CC) $(CPPFLAGS) $(CFLAGS) -shared $(LDFLAGS) \
-L$(R2_LIBDIR) \
$< -o $@ -lr_arch -lr_util
test: asm_adsp219x.so
r2 -q -a adsp219x -b 24 -c "pd 48" ../examples/isa_test.bin >/dev/null
2026-04-12 14:28:20 +00:00
install: all
mkdir -p $(R2_PLUGINS)
cp -f asm_adsp219x.so $(R2_PLUGINS)/
uninstall:
rm -f $(R2_PLUGINS)/asm_adsp219x.so
2026-04-12 14:28:20 +00:00
clean:
rm -f asm_adsp219x.so
.PHONY: all test install uninstall clean