radare2/binr/Makefile

74 lines
2.6 KiB
Makefile
Raw Normal View History

include ../global.mk
2014-03-01 23:54:05 +00:00
include ../libr/config.mk
DESTDIR:=$(DESTDIR)
BTOP=$(shell pwd)
.PHONY: all clean install install-symlink deinstall uninstall mrproper preload
BINS=r2r r2pm ravc2 rax2 rasm2 rabin2 rahash2 radiff2 radare2 rafind2 rarun2 ragg2 r2agent rasign2
LIBR2=$(call libname-version,libr2.$(EXT_SO),${LIBVERSION})
all: preload
@for BINARY in $(BINS) ; do $(MAKE) -C $${BINARY} all || exit 1; done
ifneq (,$(findstring ios-sdk,$(COMPILER)))
2016-04-25 14:52:36 +00:00
$(MAKE) ios-sign
endif
preload:
ifeq ($(WITHPIC),1)
$(MAKE) -C preload
endif
install:
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)" ; \
done
${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"
-cd "${DESTDIR}${BINDIR}" && rm -f r2 ; ln -fs radare2 r2 ; ln -fs radare2 r2p
ifeq ($(WITHPIC),1)
${INSTALL_LIB} "preload/libr2.$(EXT_SO)" "${DESTDIR}${LIBDIR}"
-cd "${DESTDIR}${LIBDIR}" && \
mv libr2.$(EXT_SO) $(LIBR2) && \
ln -fs $(LIBR2) libr2.$(EXT_SO)
endif
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
symstall install-symlink:
cd .. && \
mkdir -p "${DESTDIR}${BINDIR}" && \
for BINARY in ${BINS} ; do ln -fs "${BTOP}/$$BINARY/$$BINARY" "${DESTDIR}${BINDIR}/$$BINARY" ; done
cd .. && ln -fs "${BTOP}/r2pm/r2pm" "${DESTDIR}${BINDIR}/r2pm"
cd .. && ln -fs "${BTOP}/r2pm/r2pm.sh" "${DESTDIR}${BINDIR}/r2pm.sh"
cd .. && rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/r2pm"
cd .. && mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
-cd .. && ln -fs "${DESTDIR}${BINDIR}/radare2" "${DESTDIR}${BINDIR}/r2"
-cd .. && ln -fs "${DESTDIR}${BINDIR}/radare2" "${DESTDIR}${BINDIR}/r2p"
-cd .. && ln -fs "${BTOP}/preload/libr2.$(EXT_SO)" "${DESTDIR}${LIBDIR}/libr2.$(EXT_SO)"
-cd .. && cd "${DESTDIR}${LIBDIR}" && \
mv libr2.$(EXT_SO) $(LIBR2) && \
ln -fs $(LIBR2) libr2.$(EXT_SO)
deinstall uninstall:
-cd .. ; for BINARY in ${BINS} ; do rm -f "${DESTDIR}${BINDIR}/$$BINARY" ; done
rm -f "${DESTDIR}${BINDIR}/r2pm.sh"
rm -f "${DESTDIR}${BINDIR}/r2pm"
rm -f "${DESTDIR}${BINDIR}/r2p"
rm -f "${DESTDIR}${BINDIR}/r2"
2010-07-13 09:59:55 +00:00
clean:
@for DIR in preload ${BINS} ; do ${MAKE} -C $$DIR clean; done
2010-07-13 09:59:55 +00:00
mrproper:
@for DIR in preload ${BINS} ; do ${MAKE} -C $$DIR mrproper; done