diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-09 08:49:46 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-11 14:07:43 +0300 |
commit | 2198478cd22cec4ea2b645d4e9f31ee9c2508ff5 (patch) | |
tree | 101afb521b4d48fb0691cbb653fb2101ecea6a4f /misc/radare2/Makefile | |
parent | 987c0427f07afb5eec6c719b090a4028fd1feaac (diff) |
push for remote work
Diffstat (limited to 'misc/radare2/Makefile')
-rw-r--r-- | misc/radare2/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/misc/radare2/Makefile b/misc/radare2/Makefile new file mode 100644 index 0000000..aff2fdb --- /dev/null +++ b/misc/radare2/Makefile @@ -0,0 +1,30 @@ +MAKEFLAGS += --no-builtin-rules +R2_PLUGIN_PATH ?= $(shell r2 -H R2_USER_PLUGINS) + +# GCC 7: -Wstringop-overflow=, -Walloc-size-larger-than=, -Wduplicated-{branches,cond} +WARNINGS := -Wall -Wextra -Wformat=2 -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wstack-usage=12500 \ + -Wfloat-equal -Wcast-align -Wpointer-arith -Wchar-subscripts -Warray-bounds=2 + +override CFLAGS ?= -g +override CFLAGS += -std=c11 $(WARNINGS) + +libs = asm_fspec.so +all: $(libs) + +%.so: + $(LINK.c) -fPIC -shared $(filter %.c,$^) $(LDLIBS) -o $@ + +asm_fspec.so: private CFLAGS += $(shell pkg-config --cflags r_anal) +asm_fspec.so: private LDLIBS += $(shell pkg-config --libs-only-l r_anal) +asm_fspec.so: asm_fspec.c + +install: $(libs) + install -Dm755 $^ -t "$(R2_PLUGIN_PATH)" + +uninstall: + $(RM) "$(R2_PLUGIN_PATH)"/asm_fspec.so + +clean: + $(RM) $(libs) + +.PHONY: all clean install uninstall |