2012-10-03 12:31:35 +00:00
|
|
|
include ../global.mk
|
2014-03-01 23:54:05 +00:00
|
|
|
include ../libr/config.mk
|
|
|
|
|
2015-10-26 21:33:45 +00:00
|
|
|
DESTDIR:=$(DESTDIR)
|
2012-10-03 12:31:35 +00:00
|
|
|
BTOP=$(shell pwd)
|
2010-05-28 15:15:20 +00:00
|
|
|
|
2014-03-01 23:31:35 +00:00
|
|
|
.PHONY: all clean install install-symlink deinstall uninstall mrproper preload
|
2010-05-28 15:15:20 +00:00
|
|
|
|
2021-12-16 11:47:40 +00:00
|
|
|
BINS=r2r r2pm ravc2 rax2 rasm2 rabin2 rahash2 radiff2 radare2 rafind2 rarun2 ragg2 r2agent rasign2
|
2020-03-24 19:18:16 +00:00
|
|
|
|
2015-08-24 14:37:09 +00:00
|
|
|
LIBR2=$(call libname-version,libr2.$(EXT_SO),${LIBVERSION})
|
|
|
|
|
2014-03-01 23:31:35 +00:00
|
|
|
all: preload
|
2018-09-21 00:16:39 +00:00
|
|
|
@for BINARY in $(BINS) ; do $(MAKE) -C $${BINARY} all || exit 1; done
|
2021-12-17 10:21:52 +00:00
|
|
|
ifneq (,$(findstring ios-sdk,$(COMPILER)))
|
2016-04-25 14:52:36 +00:00
|
|
|
$(MAKE) ios-sign
|
|
|
|
endif
|
2010-05-28 15:15:20 +00:00
|
|
|
|
2021-12-17 10:21:52 +00:00
|
|
|
|
2014-03-01 23:31:35 +00:00
|
|
|
preload:
|
2018-01-10 15:52:50 +00:00
|
|
|
ifeq ($(WITHPIC),1)
|
2014-03-01 23:31:35 +00:00
|
|
|
$(MAKE) -C preload
|
2018-01-10 15:52:50 +00:00
|
|
|
endif
|
2014-03-01 23:31:35 +00:00
|
|
|
|
2010-05-28 15:15:20 +00:00
|
|
|
install:
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${DESTDIR}${BINDIR}"
|
|
|
|
for BINARY in ${BINS} ; do \
|
|
|
|
rm -f "${DESTDIR}${BINDIR}/$$BINARY" ; \
|
2021-10-19 10:18:22 +00:00
|
|
|
${INSTALL_PROGRAM} "$$BINARY/$$BINARY$(EXT_EXE)" "${DESTDIR}${BINDIR}/$$BINARY$(EXT_EXE)" ; \
|
2015-09-17 09:11:24 +00:00
|
|
|
done
|
2021-12-16 11:47:40 +00:00
|
|
|
${INSTALL_SCRIPT} "$(BTOP)/r2pm/r2pm.sh" "${DESTDIR}${BINDIR}/r2pm.sh"
|
2015-12-03 16:02:13 +00:00
|
|
|
rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/r2pm"
|
2019-06-17 08:34:04 +00:00
|
|
|
-cd "${DESTDIR}${BINDIR}" && rm -f r2 ; ln -fs radare2 r2 ; ln -fs radare2 r2p
|
2018-01-10 15:52:50 +00:00
|
|
|
ifeq ($(WITHPIC),1)
|
2015-10-26 21:33:45 +00:00
|
|
|
${INSTALL_LIB} "preload/libr2.$(EXT_SO)" "${DESTDIR}${LIBDIR}"
|
|
|
|
-cd "${DESTDIR}${LIBDIR}" && \
|
2015-08-24 14:37:09 +00:00
|
|
|
mv libr2.$(EXT_SO) $(LIBR2) && \
|
|
|
|
ln -fs $(LIBR2) libr2.$(EXT_SO)
|
2018-01-10 15:52:50 +00:00
|
|
|
endif
|
2011-07-20 17:26:07 +00:00
|
|
|
|
2016-04-25 14:52:36 +00:00
|
|
|
ios_sign ios-sign ios-sdk-sign:
|
2019-05-13 10:43:50 +00:00
|
|
|
-for a in $(BINS) ; do xcrun --sdk iphoneos codesign -s- --entitlements radare2/radare2_ios.xml $$a ; done
|
|
|
|
-for a in ../libr/*/*.${EXT_SO} ; do xcrun --sdk iphoneos codesign -s- --entitlements radare2/radare2_ios.xml $$a ; done
|
|
|
|
-for a in ../libr/*/p/*.${EXT_SO} ; do xcrun --sdk iphoneos codesign -s- --entitlements radare2/radare2_ios.xml $$a ; done
|
2016-04-25 14:52:36 +00:00
|
|
|
|
2011-05-25 13:43:54 +00:00
|
|
|
symstall install-symlink:
|
2017-10-18 23:07:47 +00:00
|
|
|
cd .. && \
|
|
|
|
mkdir -p "${DESTDIR}${BINDIR}" && \
|
2015-10-26 21:33:45 +00:00
|
|
|
for BINARY in ${BINS} ; do ln -fs "${BTOP}/$$BINARY/$$BINARY" "${DESTDIR}${BINDIR}/$$BINARY" ; done
|
2017-10-18 23:07:47 +00:00
|
|
|
cd .. && ln -fs "${BTOP}/r2pm/r2pm" "${DESTDIR}${BINDIR}/r2pm"
|
2021-12-16 11:47:40 +00:00
|
|
|
cd .. && ln -fs "${BTOP}/r2pm/r2pm.sh" "${DESTDIR}${BINDIR}/r2pm.sh"
|
2017-10-18 23:07:47 +00:00
|
|
|
cd .. && rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/r2pm"
|
|
|
|
cd .. && mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
|
|
|
|
-cd .. && ln -fs "${DESTDIR}${BINDIR}/radare2" "${DESTDIR}${BINDIR}/r2"
|
2019-06-17 08:34:04 +00:00
|
|
|
-cd .. && ln -fs "${DESTDIR}${BINDIR}/radare2" "${DESTDIR}${BINDIR}/r2p"
|
2017-10-18 23:07:47 +00:00
|
|
|
-cd .. && ln -fs "${BTOP}/preload/libr2.$(EXT_SO)" "${DESTDIR}${LIBDIR}/libr2.$(EXT_SO)"
|
|
|
|
-cd .. && cd "${DESTDIR}${LIBDIR}" && \
|
2015-08-24 14:37:09 +00:00
|
|
|
mv libr2.$(EXT_SO) $(LIBR2) && \
|
|
|
|
ln -fs $(LIBR2) libr2.$(EXT_SO)
|
2010-06-15 11:10:46 +00:00
|
|
|
|
|
|
|
deinstall uninstall:
|
2021-12-16 11:47:40 +00:00
|
|
|
-cd .. ; for BINARY in ${BINS} ; do rm -f "${DESTDIR}${BINDIR}/$$BINARY" ; done
|
|
|
|
rm -f "${DESTDIR}${BINDIR}/r2pm.sh"
|
|
|
|
rm -f "${DESTDIR}${BINDIR}/r2pm"
|
2019-06-17 08:34:04 +00:00
|
|
|
rm -f "${DESTDIR}${BINDIR}/r2p"
|
2017-10-18 23:07:47 +00:00
|
|
|
rm -f "${DESTDIR}${BINDIR}/r2"
|
2010-06-15 11:10:46 +00:00
|
|
|
|
2010-07-13 09:59:55 +00:00
|
|
|
clean:
|
2017-10-18 23:07:47 +00:00
|
|
|
@for DIR in preload ${BINS} ; do ${MAKE} -C $$DIR clean; done
|
2010-07-13 09:59:55 +00:00
|
|
|
|
|
|
|
mrproper:
|
2017-10-18 23:07:47 +00:00
|
|
|
@for DIR in preload ${BINS} ; do ${MAKE} -C $$DIR mrproper; done
|
2015-10-26 21:33:45 +00:00
|
|
|
|