forked from radareorg/radare2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
472 lines (410 loc) · 16.9 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
-include config-user.mk
include global.mk
PREVIOUS_RELEASE=`git log --tags --simplify-by-decoration --pretty='format:%d'|head -n1|cut -d ' ' -f3 |sed -e 's,),,'`
B=$(DESTDIR)$(BINDIR)
L=$(DESTDIR)$(LIBDIR)
MESON?=meson
PYTHON?=python
R2BINS=$(shell cd binr ; echo r*2 r2agent r2pm r2pm.sh r2-indent r2r)
ifdef SOURCE_DATE_EPOCH
BUILDSEC=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+__%H:%M:%S" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+__%H:%M:%S" 2>/dev/null || date -u "+__%H:%M:%S")
else
BUILDSEC=$(shell date "+__%H:%M:%S")
endif
DATADIRS=libr/cons/d libr/flag/d libr/bin/d libr/asm/d libr/syscall/d libr/magic/d libr/anal/d libr/util/d
USE_ZIP=YES
ZIP=zip
R2VC=$(shell git rev-list --all --count 2>/dev/null)
ifeq ($(R2VC),)
# release
R2VC=0
endif
STRIP?=strip
ifneq ($(shell xz --help 2>/dev/null | grep improve),)
TAR=tar -cvf
TAREXT=tar.xz
CZ=xz -f
else
TAR=bsdtar cvf
TAREXT=tar.gz
CZ=gzip -f
endif
PWD=$(shell pwd)
ifeq ($(BUILD_OS),windows)
ifeq ($(OSTYPE),mingw32)
ifneq (,$(findstring mingw32-make,$(MAKE)))
ifneq ($(APPVEYOR),True)
LC_ALL=C
export LC_ALL
endif
endif
endif
endif
all: plugins.cfg libr/include/r_version.h
@libr/count.sh reset
${MAKE} -C shlr sdbs
${MAKE} -C shlr/zip
${MAKE} -C libr/util
${MAKE} -C libr/socket
${MAKE} -C shlr
${MAKE} -C libr
${MAKE} -C binr
# GIT_TAP=$(shell (git tag -l --sort=refname 2> /dev/null || echo $(R2_VERSION)) | grep '^[0-9]\.[0-9]' | tail -n1 )
GIT_TAP=$(shell git log --decorate=short|grep tag:|head -n1|cut -d : -f 2|cut -c 2-|head -c 5)
GIT_TIP=$(shell git rev-parse HEAD 2>/dev/null || echo $(R2_VERSION))
R2_VER=$(shell ./configure -qV)
ifdef SOURCE_DATE_EPOCH
GIT_NOW=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d")
else
GIT_NOW=$(shell date "+%Y-%m-%d")
endif
tap tiptap tip:
@echo tip $(GIT_TIP)
@echo tap $(GIT_TAP)
libr/include/r_version.h:
@echo Generating r_version.h file
@echo '#ifndef R_VERSION_H' > $@.tmp
@echo '#define R_VERSION_H 1' >> $@.tmp
@echo '#define R2_VERSION_COMMIT $(R2VC)' >> $@.tmp
@echo '#define R2_VERSION "$(R2_VERSION)"' >> $@.tmp
@echo '#define R2_VERSION_MAJOR $(R2_VERSION_MAJOR)' >> $@.tmp
@echo '#define R2_VERSION_MINOR $(R2_VERSION_MINOR)' >> $@.tmp
@echo '#define R2_VERSION_PATCH $(R2_VERSION_PATCH)' >> $@.tmp
@echo '#define R2_VERSION_NUMBER $(R2_VERSION_NUMBER)' >> $@.tmp
@echo '#define R2_GITTAP $(ESC)"$(GIT_TAP)$(ESC)"' >> $@.tmp
@echo '#define R2_GITTIP $(ESC)"$(GIT_TIP)$(ESC)"' >> $@.tmp
@echo '#define R2_BIRTH $(ESC)"$(GIT_NOW)$(BUILDSEC)$(ESC)"' >> $@.tmp
@echo '#endif' >> $@.tmp
@mv -f $@.tmp $@
@rm -f $@.tmp
plugins.cfg:
@if [ ! -e config-user.mk ]; then echo ; \
echo " Please, run ./configure first" ; echo ; exit 1 ; fi
$(SHELL) ./configure-plugins
w32:
sys/mingw32.sh
depgraph.png:
cd libr ; perl depgraph.pl dot | dot -Tpng -o../depgraph.png
android:
@if [ -z "$(NDK_ARCH)" ]; then echo "Set NDK_ARCH=[arm|arm64|mips|x86]" ; false; fi
sys/android-${NDK_ARCH}.sh
w32dist:
${MAKE} windist WINBITS=w32
w64dist:
${MAKE} windist WINBITS=w64
WINDIST=${WINBITS}dist
ZIPNAME?=radare2-${WINBITS}-${VERSION}.zip
C=$(shell printf "\033[32m")
R=$(shell printf "\033[0m")
windist:
@echo "${C}[WINDIST] Installing binaries and libraries${R}"
[ -n "${WINBITS}" ] || exit 1
rm -rf "radare2-${WINBITS}-${VERSION}" "${WINDIST}"
mkdir "${WINDIST}"
for FILE in `find libr | grep -e dll$$`; do cp "$$FILE" "${WINDIST}" ; done
for FILE in `find binr | grep -e exe$$`; do cp "$$FILE" "${WINDIST}" ; done
rm -f "${WINDIST}/plugin.dll"
@echo "${C}[WINDIST] Picking plugins from libraries${R}"
mkdir -p "${WINDIST}/libs"
mv "${WINDIST}/"lib*.dll "${WINDIST}/libs"
mkdir -p "${WINDIST}/plugins"
mv ${WINDIST}/*.dll "${WINDIST}/plugins"
mv ${WINDIST}/libs/* "${WINDIST}"
@echo "${C}[WINDIST] Do not include plugins for now${R}"
rm -rf "${WINDIST}/libs"
rm -rf ${WINDIST}/plugins/*
@echo "${C}[WINDIST] Copying web interface${R}"
mkdir -p "${WINDIST}/www"
cp -rf shlr/www/* "${WINDIST}/www"
mkdir -p "${WINDIST}/share/radare2/${VERSION}/magic"
cp -f libr/magic/d/default/* "${WINDIST}/share/radare2/${VERSION}/magic"
mkdir -p "${WINDIST}/share/radare2/${VERSION}/syscall"
cp -f libr/syscall/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/syscall"
mkdir -p "${WINDIST}/share/radare2/${VERSION}/sysregs"
cp -f libr/sysregs/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/sysregs"
mkdir -p "${WINDIST}/share/radare2/${VERSION}/fcnsign"
cp -f libr/anal/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/fcnsign"
mkdir -p "${WINDIST}/share/radare2/${VERSION}/opcodes"
cp -f libr/asm/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/opcodes"
mkdir -p "${WINDIST}/share/radare2/${VERSION}/flag"
cp -f libr/flag/d/*.r2 "${WINDIST}/share/radare2/${VERSION}/flag"
mkdir -p "${WINDIST}/share/doc/radare2"
mkdir -p "${WINDIST}/include/libr/sdb"
mkdir -p "${WINDIST}/include/libr/r_util"
@echo "${C}[WINDIST] Copying development files${R}"
cp -f shlr/sdb/src/*.h "${WINDIST}/include/libr/sdb/"
cp -f libr/include/r_util/*.h "${WINDIST}/include/libr/r_util/"
cp -f libr/include/*.h "${WINDIST}/include/libr"
#mkdir -p "${WINDIST}/include/libr/sflib"
@cp -f doc/fortunes.* "${WINDIST}/share/doc/radare2"
@mkdir -p "${WINDIST}/share/radare2/${VERSION}/format/dll"
@cp -f libr/bin/d/elf32 "${WINDIST}/share/radare2/${VERSION}/format"
@cp -f libr/bin/d/elf64 "${WINDIST}/share/radare2/${VERSION}/format"
@cp -f libr/bin/d/elf_enums "${WINDIST}/share/radare2/${VERSION}/format"
@cp -f libr/bin/d/pe32 "${WINDIST}/share/radare2/${VERSION}/format"
@cp -f libr/bin/d/trx "${WINDIST}/share/radare2/${VERSION}/format"
@cp -f libr/bin/d/dll/*.sdb "${WINDIST}/share/radare2/${VERSION}/format/dll"
@mkdir -p "${WINDIST}/share/radare2/${VERSION}/cons"
@cp -PRpf libr/cons/d/* "${WINDIST}/share/radare2/${VERSION}/cons"
@mkdir -p "${WINDIST}/share/radare2/${VERSION}/hud"
@cp -f doc/hud "${WINDIST}/share/radare2/${VERSION}/hud/main"
@mv "${WINDIST}" "radare2-${WINBITS}-${VERSION}"
@rm -f "radare2-${WINBITS}-${VERSION}.zip"
ifneq ($(USE_ZIP),NO)
$(ZIP) -r "${ZIPNAME}" "radare2-${WINBITS}-${VERSION}"
endif
clean:
rm -f libr/libr.a libr/libr.dylib libr/include/r_version.h
rm -rf libr/.libr
for DIR in shlr libr binr ; do $(MAKE) -C "$$DIR" clean ; done
-rm -f `find . -type f -name '*.d'`
rm -f `find . -type f -name '*.o'`
rm -f config-user.mk plugins.cfg libr/config.h
rm -f libr/include/r_userconf.h libr/config.mk
rm -f pkgcfg/*.pc
distclean mrproper: clean
rm -f `find . -type f -iname '*.d'`
rm -rf libr/asm/arch/arm/v35arm64/arch-arm64
rm -rf libr/asm/arch/arm/v35arm64/arch-armv7
pkgcfg:
cd libr && ${MAKE} pkgcfg
install-man:
mkdir -p "${DESTDIR}${MANDIR}/man1"
mkdir -p "${DESTDIR}${MANDIR}/man7"
for FILE in man/*.1 ; do ${INSTALL_MAN} "$$FILE" "${DESTDIR}${MANDIR}/man1" ; done
cd "${DESTDIR}${MANDIR}/man1" && ln -fs radare2.1 r2.1
for FILE in man/*.7 ; do ${INSTALL_MAN} "$$FILE" "${DESTDIR}${MANDIR}/man7" ; done
install-man-symlink:
mkdir -p "${DESTDIR}${MANDIR}/man1"
mkdir -p "${DESTDIR}${MANDIR}/man7"
for FILE in $(shell cd man && ls *.1) ; do \
ln -fs "${PWD}/man/$$FILE" "${DESTDIR}${MANDIR}/man1/$$FILE" ; done
cd "${DESTDIR}${MANDIR}/man1" && ln -fs radare2.1 r2.1
for FILE in *.7 ; do \
ln -fs "${PWD}/man/$$FILE" "${DESTDIR}${MANDIR}/man7/$$FILE" ; done
cd "${DESTDIR}${MANDIR}/man1" && ln -fs radare2.1 r2.1
install-doc:
mkdir -p "${DESTDIR}${DOCDIR}"
${INSTALL_DIR} "${DESTDIR}${DOCDIR}"
@echo ${DOCDIR}
for FILE in doc/* ; do \
if [ -f $$FILE ]; then ${INSTALL_DATA} $$FILE "${DESTDIR}${DOCDIR}" || true ; fi; \
done
install-doc-symlink:
mkdir -p "${DESTDIR}${DOCDIR}"
${INSTALL_DIR} "${DESTDIR}${DOCDIR}"
for FILE in $(shell cd doc ; ls) ; do \
ln -fs "$(PWD)/doc/$$FILE" "${DESTDIR}${DOCDIR}" ; done
install: install-doc install-man install-www install-pkgconfig
$(MAKE) -C libr install
$(MAKE) -C binr install
$(MAKE) -C shlr install
for DIR in ${DATADIRS} ; do $(MAKE) -C "$$DIR" install ; done
cd "$(DESTDIR)$(LIBDIR)/radare2/" ;\
rm -f last ; ln -fs $(VERSION) last
cd "$(DESTDIR)$(DATADIR)/radare2/" ;\
rm -f last ; ln -fs $(VERSION) last
rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud"
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud"
mkdir -p "${DESTDIR}${BINDIR}"
#${INSTALL_SCRIPT} "${PWD}/sys/indent.sh" "${DESTDIR}${BINDIR}/r2-indent"
#${INSTALL_SCRIPT} "${PWD}/sys/r1-docker.sh" "${DESTDIR}${BINDIR}/r2-docker"
cp -f doc/hud "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud/main"
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
$(SHELL) ./configure-plugins --rm-static $(DESTDIR)$(LIBDIR)/radare2/last/
install-www:
rm -rf "${DESTDIR}${WWWROOT}"
rm -rf "${DESTDIR}${LIBDIR}/radare2/${VERSION}/www" # old dir
mkdir -p "${DESTDIR}${WWWROOT}"
cp -rf shlr/www/* "${DESTDIR}${WWWROOT}"
symstall-www:
rm -rf "${DESTDIR}${WWWROOT}"
rm -rf "${DESTDIR}${LIBDIR}/radare2/${VERSION}/www" # old dir
mkdir -p "${DESTDIR}${WWWROOT}"
for FILE in $(shell cd shlr/www ; ls) ; do \
ln -fs "$(PWD)/shlr/www/$$FILE" "$(DESTDIR)$(WWWROOT)" ; done
install-pkgconfig pkgconfig-install:
@${INSTALL_DIR} "${DESTDIR}${LIBDIR}/pkgconfig"
for FILE in $(shell cd pkgcfg ; ls *.pc) ; do \
cp -f "$(PWD)/pkgcfg/$$FILE" "${DESTDIR}${LIBDIR}/pkgconfig/$$FILE" ; done
install-pkgconfig-symlink pkgconfig-symstall symstall-pkgconfig:
mkdir -p "${DESTDIR}${LIBDIR}/pkgconfig"
@${INSTALL_DIR} "${DESTDIR}${LIBDIR}/pkgconfig"
for FILE in $(shell cd pkgcfg ; ls *.pc) ; do \
ln -fs "$(PWD)/pkgcfg/$$FILE" "${DESTDIR}${LIBDIR}/pkgconfig/$$FILE" ; done
symstall-sdb:
for DIR in ${DATADIRS} ; do (\
cd "$$DIR" ; \
echo "$$DIR" ; \
${MAKE} install-symlink ); \
done
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink symstall-www symstall-sdb
cd libr && ${MAKE} install-symlink
cd binr && ${MAKE} install-symlink
cd shlr && ${MAKE} install-symlink
mkdir -p "${DESTDIR}${BINDIR}"
ln -fs "${PWD}/sys/indent.sh" "${DESTDIR}${BINDIR}/r2-indent"
ln -fs "${PWD}/sys/r2-docker.sh" "${DESTDIR}${BINDIR}/r2-docker"
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud"
ln -fs "${PWD}/doc/hud" "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud/main"
#mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/flag"
#ln -fs $(PWD)/libr/flag/d/tags.r2 "${DESTDIR}${DATADIR}/radare2/${VERSION}/flag/tags.r2"
cd "$(DESTDIR)$(LIBDIR)/radare2/" ;\
rm -f last ; ln -fs $(VERSION) last
cd "$(DESTDIR)$(DATADIR)/radare2/" ;\
rm -f last ; ln -fs $(VERSION) last
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
$(SHELL) ./configure-plugins --rm-static $(DESTDIR)/$(LIBDIR)/radare2/last/
deinstall uninstall:
rm -f $(DESTDIR)$(BINDIR)/r2-indent
rm -f $(DESTDIR)$(BINDIR)/r2-docker
cd libr && ${MAKE} uninstall
cd binr && ${MAKE} uninstall
cd shlr && ${MAKE} uninstall
cd libr/util/d && ${MAKE} uninstall
cd libr/syscall/d && ${MAKE} uninstall
cd libr/anal/d && ${MAKE} uninstall
@echo
@echo "Run 'make purge' to also remove installed files from previous versions of r2"
@echo
purge-doc:
rm -rf "${DESTDIR}${DOCDIR}"
cd man ; for FILE in *.1 ; do rm -f "${DESTDIR}${MANDIR}/man1/$$FILE" ; done
rm -f "${DESTDIR}${MANDIR}/man1/r2.1"
user-wrap=echo "\#!/bin/sh" > ~/bin/"$1" \
; echo "${PWD}/env.sh '${PREFIX}' '$1' \"\$$@\"" >> ~/bin/"$1" \
; chmod +x ~/bin/"$1" ;
user-install:
mkdir -p ~/bin
$(foreach mod,$(R2BINS),$(call user-wrap,$(mod)))
cd ~/bin ; ln -fs radare2 r2
user-uninstall:
$(foreach mod,$(R2BINS),rm -f ~/bin/"$(mod)")
rm -f ~/bin/r2
-rmdir ~/bin
purge-dev:
rm -f "${DESTDIR}${LIBDIR}/libr_"*".${EXT_AR}"
rm -f "${DESTDIR}${LIBDIR}/pkgconfig/r_"*.pc
rm -rf "${DESTDIR}${INCLUDEDIR}/libr"
rm -f "${DESTDIR}${LIBDIR}/radare2/${VERSION}/-"*
# required for EXT_SO
include libr/config.mk
strip:
#-for FILE in ${R2BINS} ; do ${STRIP} -s "${DESTDIR}${BINDIR}/$$FILE" 2> /dev/null ; done
ifeq ($(HOST_OS),darwin)
-${STRIP} -STxX "${DESTDIR}${LIBDIR}/libr_"*".${EXT_SO}"
else
-${STRIP} -s "${DESTDIR}${LIBDIR}/libr_"*".${EXT_SO}"
endif
purge: purge-doc purge-dev user-uninstall
for FILE in ${R2BINS} ; do rm -f "${DESTDIR}${BINDIR}/$$FILE" ; done
rm -f "${DESTDIR}${BINDIR}/ragg2-cc"
rm -f "${DESTDIR}${BINDIR}/r2"
rm -f "${DESTDIR}${LIBDIR}/libr_"*
rm -f "${DESTDIR}${LIBDIR}/libr2"*".${EXT_SO}"
rm -rf "${DESTDIR}${LIBDIR}/radare2"
rm -rf "${DESTDIR}${INCLUDEDIR}/libr"
rm -rf "${DESTDIR}${DATADIR}/radare2"
system-purge: purge
sys/purge.sh
R2V=radare2-${VERSION}
v ver version:
@echo CURRENT=${VERSION}
@echo PREVIOUS=${PREVIOUS_RELEASE}
dist:
rm -rf $(R2V)
git clone . $(R2V)
-cd $(R2V) && [ ! -f config-user.mk -o configure -nt config-user.mk ] && ./configure "--prefix=${PREFIX}"
cd $(R2V) ; git log $$(git show-ref | grep ${PREVIOUS_RELEASE} | awk '{print $$1}')..HEAD > ChangeLog
$(MAKE) -C $(R2V)/shlr capstone-sync
FILES=`cd $(R2V); git ls-files | sed -e "s,^,$(R2V)/,"` ; \
CS_FILES=`cd $(R2V)/shlr/capstone ; git ls-files | grep -v pdf | grep -v xcode | grep -v msvc | grep -v suite | grep -v bindings | grep -v tests | sed -e "s,^,$(R2V)/shlr/capstone/,"` ; \
${TAR} "radare2-${VERSION}.tar" $${FILES} $${CS_FILES} "$(R2V)/ChangeLog" ; \
${CZ} "radare2-${VERSION}.tar"
olddist:
-[ configure -nt config-user.mk ] && ./configure "--prefix=${PREFIX}"
#git log $$(git show-ref `git tag |tail -n1`)..HEAD > ChangeLog
git log $$(git show-ref | grep ${PREVIOUS_RELEASE} | awk '{print $$1}')..HEAD > ChangeLog
cd shlr && ${MAKE} capstone-sync
$(MAKE) -R capstone.ps
DIR=`basename "$$PWD"` ; \
FILES=`git ls-files | sed -e "s,^,radare2-${VERSION}/,"` ; \
CS_FILES=`cd shlr/capstone ; git ls-files | grep -v pdf | grep -v xcode | grep -v msvc | grep -v suite | grep -v bindings | grep -v tests | sed -e "s,^,radare2-${VERSION}/shlr/capstone/,"` ; \
cd .. && mv "$${DIR}" "radare2-${VERSION}" && \
${TAR} "radare2-${VERSION}.tar" $${FILES} $${CS_FILES} "radare2-${VERSION}/ChangeLog" ; \
${CZ} "radare2-${VERSION}.tar" ; \
mv "radare2-${VERSION}" "$${DIR}"
shot:
DATE=`date '+%Y%m%d'` ; \
FILES=`git ls-files | sed -e "s,^,radare2-${DATE}/,"` ; \
cd .. && mv radare2 "radare2-$${DATE}" && \
${TAR} "radare2-$${DATE}.tar" $${FILES} ;\
${CZ} "radare2-$${DATE}.tar" ;\
mv "radare2-$${DATE}" radare2 && \
scp "radare2-$${DATE}.${TAREXT}" \
radare.org:/srv/http/radareorg/get/shot
tests test:
$(MAKE) -C test
macos-sign:
$(MAKE) -C binr/radare2 macos-sign
macos-sign-libs:
$(MAKE) -C binr/radare2 macos-sign-libs
osx-pkg:
sys/osx-pkg.sh $(VERSION)
quality:
./sys/shellcheck.sh
menu nconfig:
./sys/menu.sh || true
meson:
@echo "[ Meson R2 Building ]"
$(PYTHON) sys/meson.py --prefix="${PREFIX}" --shared
meson-install:
DESTDIR="$(DESTDIR)" ninja -C build install
meson-symstall: symstall-sdb
@echo "[ Meson symstall (not stable) ]"
ln -fs $(PWD)/binr/r2pm/r2pm ${B}/r2pm
ln -fs $(PWD)/binr/r2pm/r2pm.sh ${B}/r2pm.sh
ln -fs $(PWD)/build/binr/rasm2/rasm2 ${B}/rasm2
ln -fs $(PWD)/build/binr/rarun2/rarun2 ${B}/rarun2
ln -fs $(PWD)/build/binr/radare2/radare2 ${B}/radare2
ln -fs $(PWD)/build/binr/rahash2/rahash2 ${B}/rahash2
ln -fs $(PWD)/build/binr/rabin2/rabin2 ${B}/rabin2
ln -fs $(PWD)/build/binr/radare2/radare2 ${B}/radare2
ln -fs $(PWD)/build/binr/ragg2/ragg2 ${B}/ragg2
cd $(B) && ln -fs radare2 r2
ln -fs $(PWD)/build/libr/util/libr_util.$(EXT_SO) ${L}/libr_util.$(EXT_SO)
ln -fs $(PWD)/build/libr/bp/libr_bp.$(EXT_SO) ${L}/libr_bp.$(EXT_SO)
ln -fs $(PWD)/build/libr/syscall/libr_syscall.$(EXT_SO) ${L}/libr_syscall.$(EXT_SO)
ln -fs $(PWD)/build/libr/cons/libr_cons.$(EXT_SO) ${L}/libr_cons.$(EXT_SO)
ln -fs $(PWD)/build/libr/search/libr_search.$(EXT_SO) ${L}/libr_search.$(EXT_SO)
ln -fs $(PWD)/build/libr/magic/libr_magic.$(EXT_SO) ${L}/libr_magic.$(EXT_SO)
ln -fs $(PWD)/build/libr/flag/libr_flag.$(EXT_SO) ${L}/libr_flag.$(EXT_SO)
ln -fs $(PWD)/build/libr/reg/libr_reg.$(EXT_SO) ${L}/libr_reg.$(EXT_SO)
ln -fs $(PWD)/build/libr/bin/libr_bin.$(EXT_SO) ${L}/libr_bin.$(EXT_SO)
ln -fs $(PWD)/build/libr/config/libr_config.$(EXT_SO) ${L}/libr_config.$(EXT_SO)
ln -fs $(PWD)/build/libr/parse/libr_parse.$(EXT_SO) ${L}/libr_parse.$(EXT_SO)
ln -fs $(PWD)/build/libr/lang/libr_lang.$(EXT_SO) ${L}/libr_lang.$(EXT_SO)
ln -fs $(PWD)/build/libr/asm/libr_asm.$(EXT_SO) ${L}/libr_asm.$(EXT_SO)
ln -fs $(PWD)/build/libr/anal/libr_anal.$(EXT_SO) ${L}/libr_anal.$(EXT_SO)
ln -fs $(PWD)/build/libr/egg/libr_egg.$(EXT_SO) ${L}/libr_egg.$(EXT_SO)
ln -fs $(PWD)/build/libr/fs/libr_fs.$(EXT_SO) ${L}/libr_fs.$(EXT_SO)
ln -fs $(PWD)/build/libr/debug/libr_debug.$(EXT_SO) ${L}/libr_debug.$(EXT_SO)
ln -fs $(PWD)/build/libr/core/libr_core.$(EXT_SO) ${L}/libr_core.$(EXT_SO)
meson-uninstall:
ninja -C build uninstall
$(MAKE) uninstall
meson-clean:
rm -rf build
rm -rf build_sdb
MESON_FILES=$(shell find build/libr build/binr -type f | grep -v @)
meson-symstall-experimental:
for a in $(MESON_FILES) ; do echo ln -fs "$(PWD)/$$a" "$(PWD)/$$(echo $$a|sed -e s,build/,,)" ; done
$(MAKE) symstall
shlr/capstone:
$(MAKE) -C shlr capstone
.PHONY: meson meson-install
include ${MKPLUGINS}
.PHONY: all clean install symstall uninstall deinstall strip
.PHONY: libr binr install-man w32dist tests dist shot pkgcfg depgraph.png love
.PHONY: purge system-purge
.PHONY: shlr/capstone