mirror of
https://github.com/radareorg/radare2-r2papi.git
synced 2026-11-13 06:01:24 -10:00
22 lines
432 B
Makefile
22 lines
432 B
Makefile
UNAME=$(shell uname | tr A-Z a-z)
|
|
PASVER=2.2.0
|
|
|
|
ifeq ($(UNAME),darwin)
|
|
OS=macos
|
|
else
|
|
OS=linux
|
|
endif
|
|
PAS2JS=pas2js-$(OS)-$(PASVER)/bin/x86_64-$(UNAME)/pas2js
|
|
|
|
all: $(PAS2JS)
|
|
$(PAS2JS) -O2 -B -Jc -Tnodejs hello.pas
|
|
r2 -j hello.js
|
|
|
|
json:
|
|
$(PAS2JS) -O2 -B -Jc -Tnodejs json.pas
|
|
r2 -j json.js
|
|
|
|
$(PAS2JS):
|
|
wget -c https://downloads.freepascal.org/fpc/contrib/pas2js/$(PASVER)/pas2js-$(OS)-$(PASVER).zip
|
|
unzip pas2js-$(OS)-$(PASVER)
|