-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
all: | ||
PLUGDIR=$(shell r2 -H R2_USER_PLUGINS) | ||
SYS_PLUGDIR=$(shell r2 -H R2_LIBR_PLUGINS) | ||
|
||
all: sarif.r2.js | ||
|
||
r2: sarif.r2.js | ||
r2 -i sarif.r2.js /bin/ls | ||
|
||
sarif.r2.js: sarif-ts/plugin.r2.ts | ||
cd sarif-ts/sarif && R2PM_OFFLINE=1 r2pm -r r2frida-compile -o types.js types.ts | ||
cd sarif-ts && R2PM_OFFLINE=1 r2pm -r r2frida-compile -o ../sarif.r2.js plugin.r2.ts | ||
|
||
test: | ||
R2R_OFFLINE=1 r2r -i test/db | ||
|
||
install: | ||
mkdir -p $(shell r2 -H R2_USER_PLUGINS) | ||
ln -fs $(shell pwd)/sarif.r2.js $(shell r2 -H R2_USER_PLUGINS)/sarif.r2.js | ||
user-install: sarif.r2.js | ||
mkdir -p $(PLUGDIR) | ||
rm -f $(PLUGDIR)/sarif.r2.js | ||
cp -f sarif.r2.js $(PLUGDIR)/sarif.r2.js | ||
|
||
user-install: | ||
mkdir -p $(shell r2 -H R2_USER_PLUGINS) | ||
cp -f sarif.r2.js $(shell r2 -H R2_USER_PLUGINS) | ||
user-symstall: | ||
mkdir -p $(PLUGDIR) | ||
rm -f $(PLUGDIR)/sarif.r2.js | ||
ln -fs $(shell pwd)/sarif.r2.js $(PLUGDIR)/sarif.r2.js | ||
|
||
user-uninstall: | ||
rm -f $(shell r2 -H R2_USER_PLUGINS)/sarif.r2.js | ||
|
||
install: | ||
$(MAKE) user-install PLUGDIR=$(SYS_PLUGDIR) | ||
|
||
symstall: | ||
mkdir -p $(shell r2 -H R2_USER_PLUGINS) | ||
ln -fs $(shell pwd)/sarif.r2.js $(shell r2 -H R2_USER_PLUGINS) | ||
$(MAKE) user-symstall PLUGDIR=$(SYS_PLUGDIR) | ||
|
||
uninstall user-uninstall: | ||
rm -f $(shell r2 -H R2_USER_PLUGINS)/sarif.r2.js | ||
uninstall: | ||
$(MAKE) user-uninstall PLUGDIR=$(SYS_PLUGDIR) | ||
|
||
indent: | ||
cat sarif.r2.js | sed -e 's/\t/ /g' > tmp.r2.js | ||
mv tmp.r2.js sarif.r2.js | ||
semistandard --global r2 --fix sarif.r2.js | ||
purge: user-uninstall uninstall | ||
|
||
.PHONY: all test install user-install symstall uninstall user-uninstall indent | ||
.PHONY: all test | ||
.PHONY: user-install user-symstall user-uninstall | ||
.PHONY: install symstall uninstall purge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters