2012-02-18 00:49:59 +00:00
|
|
|
-include config-user.mk
|
2010-01-15 00:32:28 +00:00
|
|
|
include global.mk
|
2009-03-05 12:15:28 +00:00
|
|
|
|
2016-04-04 10:16:06 +00:00
|
|
|
PREVIOUS_RELEASE=0.10.1
|
2016-01-20 02:44:59 +00:00
|
|
|
|
2013-12-19 22:54:52 +00:00
|
|
|
R2R=radare2-regressions
|
2013-12-20 01:10:36 +00:00
|
|
|
R2R_URL=$(shell doc/repo REGRESSIONS)
|
2015-10-08 17:08:04 +00:00
|
|
|
R2BINS=$(shell cd binr ; echo r*2 r2agent r2pm)
|
2015-10-30 02:07:22 +00:00
|
|
|
DATADIRS=libr/cons/d libr/bin/d libr/asm/d libr/syscall/d libr/magic/d libr/anal/d
|
2015-05-25 16:27:59 +00:00
|
|
|
USE_ZIP=YES
|
|
|
|
ZIP=zip
|
2016-02-27 11:33:39 +00:00
|
|
|
|
|
|
|
R2VC=$(shell git rev-list --all --count 2>/dev/null)
|
2015-04-28 21:47:44 +00:00
|
|
|
ifeq ($(R2VC),)
|
|
|
|
R2VC=9999999
|
|
|
|
endif
|
2016-02-27 11:33:39 +00:00
|
|
|
|
2012-02-17 12:55:54 +00:00
|
|
|
STRIP?=strip
|
2015-09-23 20:37:15 +00:00
|
|
|
ifneq ($(shell xz --help 2>/dev/null | grep improve),)
|
2013-07-07 21:03:10 +00:00
|
|
|
TAR=tar -cvf
|
|
|
|
TAREXT=tar.xz
|
|
|
|
CZ=xz -f
|
2011-07-18 22:12:36 +00:00
|
|
|
else
|
2013-07-07 21:03:10 +00:00
|
|
|
TAR=bsdtar cvf
|
|
|
|
TAREXT=tar.gz
|
|
|
|
CZ=gzip -f
|
2011-07-18 22:12:36 +00:00
|
|
|
endif
|
2014-09-01 13:50:04 +00:00
|
|
|
PWD=$(shell pwd)
|
2010-10-29 01:38:43 +00:00
|
|
|
|
2016-01-22 19:48:34 +00:00
|
|
|
# For echo without quotes
|
2016-02-16 12:01:41 +00:00
|
|
|
Q='
|
|
|
|
ESC=
|
2016-01-22 19:48:34 +00:00
|
|
|
ifeq ($(BUILD_OS),windows)
|
2016-02-03 11:13:01 +00:00
|
|
|
ifeq ($(OSTYPE),mingw32)
|
2016-02-25 16:03:48 +00:00
|
|
|
ifneq (,$(findstring mingw32-make,$(MAKE)))
|
2016-02-16 12:01:41 +00:00
|
|
|
ifneq ($(APPVEYOR),True)
|
2016-01-22 22:15:33 +00:00
|
|
|
Q=
|
|
|
|
ESC=^
|
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
2016-01-22 19:48:34 +00:00
|
|
|
endif
|
2016-02-16 12:01:41 +00:00
|
|
|
endif
|
2016-01-22 19:48:34 +00:00
|
|
|
endif
|
2016-02-25 16:03:48 +00:00
|
|
|
endif
|
2016-01-22 19:48:34 +00:00
|
|
|
|
2015-02-06 23:09:14 +00:00
|
|
|
all: plugins.cfg libr/include/r_version.h
|
2014-08-10 23:06:21 +00:00
|
|
|
${MAKE} -C shlr/zip
|
2013-06-25 15:35:36 +00:00
|
|
|
${MAKE} -C libr/util
|
2014-07-17 08:34:53 +00:00
|
|
|
${MAKE} -C libr/socket
|
2014-05-08 00:58:20 +00:00
|
|
|
${MAKE} -C shlr
|
|
|
|
${MAKE} -C libr
|
|
|
|
${MAKE} -C binr
|
2010-01-13 22:42:49 +00:00
|
|
|
|
2015-02-06 23:09:14 +00:00
|
|
|
.PHONY: libr/include/r_version.h
|
2015-11-08 10:52:45 +00:00
|
|
|
GIT_TAP=$(shell git describe --tags --match "[0-9]*" 2>/dev/null || echo $(VERSION))
|
2015-09-23 20:37:15 +00:00
|
|
|
GIT_TIP=$(shell git rev-parse HEAD 2>/dev/null || echo HEAD)
|
|
|
|
GIT_NOW=$(shell date +%Y-%m-%d)
|
|
|
|
|
2015-02-06 23:09:14 +00:00
|
|
|
libr/include/r_version.h:
|
2016-01-25 12:19:41 +00:00
|
|
|
@echo Generating r_version.h file
|
2016-01-22 21:51:58 +00:00
|
|
|
@echo $(Q)#ifndef R_VERSION_H$(Q) > $@.tmp
|
|
|
|
@echo $(Q)#define R_VERSION_H 1$(Q) >> $@.tmp
|
|
|
|
@echo $(Q)#define R2_VERSION_COMMIT $(R2VC)$(Q) >> $@.tmp
|
|
|
|
@echo $(Q)#define R2_GITTAP $(ESC)"$(GIT_TAP)$(ESC)"$(Q) >> $@.tmp
|
|
|
|
@echo $(Q)#define R2_GITTIP $(ESC)"$(GIT_TIP)$(ESC)"$(Q) >> $@.tmp
|
|
|
|
@echo $(Q)#define R2_BIRTH $(ESC)"$(GIT_NOW)$(ESC)"$(Q) >> $@.tmp
|
|
|
|
@echo $(Q)#endif$(Q) >> $@.tmp
|
2016-01-03 01:13:53 +00:00
|
|
|
@cmp -s $@.tmp $@ || (mv -f $@.tmp $@ && echo "Update libr/include/r_version.h")
|
|
|
|
@rm -f $@.tmp
|
2015-02-06 23:09:14 +00:00
|
|
|
|
2010-01-13 22:42:49 +00:00
|
|
|
plugins.cfg:
|
2011-05-15 23:47:01 +00:00
|
|
|
@if [ ! -e config-user.mk ]; then echo ; \
|
|
|
|
echo " Please, run ./configure first" ; echo ; exit 1 ; fi
|
2015-10-31 01:46:00 +00:00
|
|
|
sh configure-plugins
|
2010-01-12 18:57:33 +00:00
|
|
|
|
2010-10-17 23:51:00 +00:00
|
|
|
w32:
|
2013-07-04 01:34:28 +00:00
|
|
|
sys/mingw32.sh
|
2010-10-17 23:51:00 +00:00
|
|
|
|
2012-09-02 23:27:52 +00:00
|
|
|
depgraph.png:
|
|
|
|
cd libr ; perl depgraph.pl | dot -Tpng -odepgraph.png
|
|
|
|
|
|
|
|
android:
|
2016-01-22 19:53:01 +00:00
|
|
|
@if [ -z "$(NDK_ARCH)" ]; then echo "Set NDK_ARCH=[arm|arm64|mips|x86]" ; false; fi
|
2012-09-02 23:27:52 +00:00
|
|
|
sys/android-${NDK_ARCH}.sh
|
|
|
|
|
2010-01-15 16:02:04 +00:00
|
|
|
w32dist:
|
2015-03-20 12:07:56 +00:00
|
|
|
${MAKE} windist WINBITS=w32
|
|
|
|
|
|
|
|
w64dist:
|
|
|
|
${MAKE} windist WINBITS=w64
|
|
|
|
|
|
|
|
WINDIST=${WINBITS}dist
|
|
|
|
|
2015-10-23 00:58:48 +00:00
|
|
|
C=$(shell printf "\033[32m")
|
|
|
|
R=$(shell printf "\033[0m")
|
2015-03-20 12:07:56 +00:00
|
|
|
windist:
|
2015-10-23 00:58:48 +00:00
|
|
|
@echo "${C}[WINDIST] Installing binaries and libraries${R}"
|
2015-03-20 12:07:56 +00:00
|
|
|
[ -n "${WINBITS}" ] || exit 1
|
2015-10-26 21:33:45 +00:00
|
|
|
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"
|
2015-10-23 00:58:48 +00:00
|
|
|
@echo "${C}[WINDIST] Picking plugins from libraries${R}"
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${WINDIST}/libs"
|
2015-10-27 14:42:09 +00:00
|
|
|
mv "${WINDIST}/"lib*.dll "${WINDIST}/libs"
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${WINDIST}/plugins"
|
|
|
|
mv ${WINDIST}/*.dll "${WINDIST}/plugins"
|
|
|
|
mv ${WINDIST}/libs/* "${WINDIST}"
|
2015-10-23 00:58:48 +00:00
|
|
|
@echo "${C}[WINDIST] Do not include plugins for now${R}"
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -rf "${WINDIST}/libs"
|
2015-10-23 00:58:48 +00:00
|
|
|
rm -rf ${WINDIST}/plugins/*
|
|
|
|
@echo "${C}[WINDIST] Copying web interface${R}"
|
2015-10-26 21:33:45 +00:00
|
|
|
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"
|
2015-10-30 02:07:22 +00:00
|
|
|
mkdir -p "${WINDIST}/share/radare2/${VERSION}/fcnsign"
|
2015-10-30 10:08:58 +00:00
|
|
|
cp -f libr/anal/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/fcnsign"
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${WINDIST}/share/radare2/${VERSION}/opcodes"
|
|
|
|
cp -f libr/asm/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/opcodes"
|
|
|
|
mkdir -p "${WINDIST}/share/doc/radare2"
|
|
|
|
mkdir -p "${WINDIST}/include/libr/sdb"
|
2015-10-23 00:58:48 +00:00
|
|
|
@echo "${C}[WINDIST] Copying development files${R}"
|
2015-10-26 21:33:45 +00:00
|
|
|
cp -f libr/include/sdb/*.h "${WINDIST}/include/libr/sdb/"
|
|
|
|
cp -f libr/include/*.h "${WINDIST}/include/libr"
|
|
|
|
#mkdir -p "${WINDIST}/include/libr/sflib"
|
|
|
|
@cp -f doc/fortunes.* "${WINDIST}/share/doc/radare2"
|
2016-01-20 20:15:33 +00:00
|
|
|
@mkdir -p "${WINDIST}/share/radare2/${VERSION}/format/dll"
|
|
|
|
@cp -f libr/bin/d/{elf,pe}* "${WINDIST}/share/radare2/${VERSION}/format"
|
|
|
|
@cp -f libr/bin/d/dll/*.sdb "${WINDIST}/share/radare2/${VERSION}/format/dll"
|
2015-10-26 21:33:45 +00:00
|
|
|
@mkdir -p "${WINDIST}/share/radare2/${VERSION}/cons"
|
|
|
|
@cp -f 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"
|
2015-05-25 16:27:59 +00:00
|
|
|
ifneq ($(USE_ZIP),NO)
|
2015-10-26 21:33:45 +00:00
|
|
|
$(ZIP) -r "radare2-${WINBITS}-${VERSION}.zip" "radare2-${WINBITS}-${VERSION}"
|
2015-05-25 16:27:59 +00:00
|
|
|
endif
|
2010-01-15 16:02:04 +00:00
|
|
|
|
2014-11-22 01:51:35 +00:00
|
|
|
clean: rmd
|
2015-10-26 21:33:45 +00:00
|
|
|
for DIR in shlr libr binr ; do (cd "$$DIR" ; ${MAKE} clean) ; done
|
2010-01-13 22:42:49 +00:00
|
|
|
|
2013-01-23 00:53:32 +00:00
|
|
|
distclean mrproper:
|
2015-10-26 21:33:45 +00:00
|
|
|
-rm -f `find . -type f -name '*.d'`
|
2015-12-28 19:40:18 +00:00
|
|
|
rm -f `find . -type f -name '*.o'`
|
2015-10-26 21:33:45 +00:00
|
|
|
for DIR in libr binr shlr ; do ( cd "$$DIR" ; ${MAKE} mrproper) ; done
|
2012-09-03 23:46:12 +00:00
|
|
|
rm -f config-user.mk plugins.cfg libr/config.h
|
|
|
|
rm -f libr/include/r_userconf.h libr/config.mk
|
2010-06-15 12:10:42 +00:00
|
|
|
rm -f pkgcfg/*.pc
|
2009-06-15 02:44:05 +00:00
|
|
|
|
2009-07-16 00:30:20 +00:00
|
|
|
pkgcfg:
|
2010-01-22 13:19:10 +00:00
|
|
|
cd libr && ${MAKE} pkgcfg
|
2009-07-16 00:30:20 +00:00
|
|
|
|
2010-03-12 17:46:11 +00:00
|
|
|
install-man:
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${DESTDIR}${MANDIR}/man1"
|
2016-01-20 01:22:00 +00:00
|
|
|
mkdir -p "${DESTDIR}${MANDIR}/man7"
|
2015-10-26 21:33:45 +00:00
|
|
|
for FILE in man/*.1 ; do ${INSTALL_MAN} "$$FILE" "${DESTDIR}${MANDIR}/man1" ; done
|
|
|
|
cd "${DESTDIR}${MANDIR}/man1" && ln -fs radare2.1 r2.1
|
2016-01-20 01:22:00 +00:00
|
|
|
for FILE in man/*.7 ; do ${INSTALL_MAN} "$$FILE" "${DESTDIR}${MANDIR}/man7" ; done
|
2010-06-18 15:52:30 +00:00
|
|
|
|
|
|
|
install-man-symlink:
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${DESTDIR}${MANDIR}/man1"
|
2016-01-20 01:22:00 +00:00
|
|
|
mkdir -p "${DESTDIR}${MANDIR}/man7"
|
2015-10-26 21:33:45 +00:00
|
|
|
cd man && for FILE in *.1 ; do \
|
|
|
|
ln -fs "${PWD}/man/$$FILE" "${DESTDIR}${MANDIR}/man1/$$FILE" ; done
|
|
|
|
cd "${DESTDIR}${MANDIR}/man1" && ln -fs radare2.1 r2.1
|
2016-01-20 01:22:00 +00:00
|
|
|
for FILE in *.7 ; do \
|
|
|
|
ln -fs "${PWD}/man/$$FILE" "${DESTDIR}${MANDIR}/man7/$$FILE" ; done
|
2010-03-12 17:46:11 +00:00
|
|
|
|
2011-02-17 00:22:15 +00:00
|
|
|
install-doc:
|
2015-10-26 21:33:45 +00:00
|
|
|
${INSTALL_DIR} "${DESTDIR}${DATADIR}/doc/radare2"
|
|
|
|
for FILE in doc/* ; do ${INSTALL_DATA} $$FILE "${DESTDIR}${DATADIR}/doc/radare2" ; done
|
2011-02-17 00:22:15 +00:00
|
|
|
|
|
|
|
install-doc-symlink:
|
2015-10-26 21:33:45 +00:00
|
|
|
${INSTALL_DIR} "${DESTDIR}${DATADIR}/doc/radare2"
|
|
|
|
cd doc ; for FILE in * ; do \
|
|
|
|
ln -fs "${PWD}/doc/$$FILE" "${DESTDIR}${DATADIR}/doc/radare2" ; done
|
2011-02-17 00:22:15 +00:00
|
|
|
|
2015-04-18 08:35:57 +00:00
|
|
|
install love: install-doc install-man install-www
|
2015-10-26 21:33:45 +00:00
|
|
|
cd libr && ${MAKE} install PARENT=1
|
|
|
|
cd binr && ${MAKE} install
|
|
|
|
cd shlr && ${MAKE} install
|
|
|
|
for DIR in ${DATADIRS} ; do \
|
|
|
|
(cd "$$DIR" ; ${MAKE} install ); \
|
2011-11-29 02:14:27 +00:00
|
|
|
done
|
2015-12-03 16:02:13 +00:00
|
|
|
cd "$(DESTDIR)$(LIBDIR)/radare2/" ;\
|
|
|
|
rm -f last ; ln -fs $(VERSION) last
|
|
|
|
cd "$(DESTDIR)$(DATADIR)/radare2/" ;\
|
|
|
|
rm -f last ; ln -fs $(VERSION) last
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -rf "${DESTDIR}${LIBDIR}/radare2/${VERSION}/hud"
|
|
|
|
mkdir -p "${DESTDIR}${LIBDIR}/radare2/${VERSION}/hud"
|
|
|
|
cp -f doc/hud "${DESTDIR}${LIBDIR}/radare2/${VERSION}/hud/main"
|
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
|
2013-06-16 23:39:49 +00:00
|
|
|
sys/ldconfig.sh
|
2009-02-05 21:28:33 +00:00
|
|
|
|
2014-11-22 01:51:35 +00:00
|
|
|
# Remove make .d files. fixes build when .c files are removed
|
|
|
|
rmd:
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -f `find . -type f -iname '*.d'`
|
2014-11-22 01:51:35 +00:00
|
|
|
|
2012-09-06 01:12:54 +00:00
|
|
|
install-www:
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -rf "${DESTDIR}${WWWROOT}"
|
|
|
|
rm -rf "${DESTDIR}${LIBDIR}/radare2/${VERSION}/www" # old dir
|
|
|
|
mkdir -p "${DESTDIR}${WWWROOT}"
|
|
|
|
cp -rf shlr/www/* "${DESTDIR}${WWWROOT}"
|
|
|
|
|
2012-09-06 01:12:54 +00:00
|
|
|
|
|
|
|
symstall-www:
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -rf "${DESTDIR}${WWWROOT}"
|
|
|
|
rm -rf "${DESTDIR}${LIBDIR}/radare2/${VERSION}/www" # old dir
|
|
|
|
mkdir -p "${DESTDIR}${WWWROOT}"
|
|
|
|
cd "${DESTDIR}${WWWROOT}" ; \
|
|
|
|
for FILE in "${PWD}/shlr/www/"* ; do \
|
|
|
|
ln -fs "$$FILE" "$(DESTDIR)$(WWWROOT)" ; done
|
2012-09-06 01:12:54 +00:00
|
|
|
|
2011-02-27 20:56:13 +00:00
|
|
|
install-pkgconfig-symlink:
|
2015-10-26 21:33:45 +00:00
|
|
|
@${INSTALL_DIR} "${DESTDIR}${LIBDIR}/pkgconfig"
|
|
|
|
cd pkgcfg ; for FILE in *.pc ; do \
|
|
|
|
ln -fs "$${PWD}/$$FILE" "${DESTDIR}${LIBDIR}/pkgconfig/$$FILE" ; done
|
2014-07-09 23:13:04 +00:00
|
|
|
|
2011-02-27 20:56:13 +00:00
|
|
|
|
2012-09-06 01:12:54 +00:00
|
|
|
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink symstall-www
|
2015-10-26 21:33:45 +00:00
|
|
|
cd libr && ${MAKE} install-symlink
|
|
|
|
cd binr && ${MAKE} install-symlink
|
|
|
|
cd shlr && ${MAKE} install-symlink
|
|
|
|
for DIR in ${DATADIRS} ; do (\
|
|
|
|
cd "$$DIR" ; \
|
|
|
|
echo "$$DIR" ; \
|
|
|
|
${MAKE} install-symlink ); \
|
2011-11-29 02:14:27 +00:00
|
|
|
done
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${DESTDIR}${LIBDIR}/radare2/${VERSION}/hud"
|
|
|
|
cd "$(DESTDIR)$(LIBDIR)/radare2/" ;\
|
2014-07-09 23:13:04 +00:00
|
|
|
rm -f last ; ln -fs $(VERSION) last
|
2015-12-03 16:02:13 +00:00
|
|
|
cd "$(DESTDIR)$(DATADIR)/radare2/" ;\
|
2014-07-09 23:13:04 +00:00
|
|
|
rm -f last ; ln -fs $(VERSION) last
|
2015-10-26 21:33:45 +00:00
|
|
|
ln -fs "${PWD}/doc/hud" "${DESTDIR}${LIBDIR}/radare2/${VERSION}/hud/main"
|
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
|
2013-06-16 23:39:49 +00:00
|
|
|
sys/ldconfig.sh
|
2010-05-24 15:51:51 +00:00
|
|
|
|
2011-03-28 08:24:01 +00:00
|
|
|
deinstall uninstall:
|
2015-10-26 21:33:45 +00:00
|
|
|
cd libr && ${MAKE} uninstall PARENT=1
|
|
|
|
cd binr && ${MAKE} uninstall PARENT=1
|
|
|
|
cd shlr && ${MAKE} uninstall PARENT=1
|
|
|
|
cd libr/syscall/d && ${MAKE} uninstall PARENT=1
|
2015-10-30 02:07:22 +00:00
|
|
|
cd libr/anal/d && ${MAKE} uninstall PARENT=1
|
2011-03-28 08:24:01 +00:00
|
|
|
@echo
|
|
|
|
@echo "Run 'make purge' to also remove installed files from previous versions of r2"
|
|
|
|
@echo
|
|
|
|
|
2012-02-17 12:23:58 +00:00
|
|
|
purge-doc:
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -rf "${DESTDIR}${DATADIR}/doc/radare2"
|
|
|
|
cd man ; for FILE in *.1 ; do rm -f "${DESTDIR}${MANDIR}/man1/$$FILE" ; done
|
|
|
|
rm -f "${DESTDIR}${MANDIR}/man1/r2.1"
|
2012-02-17 12:23:58 +00:00
|
|
|
|
2015-10-26 21:33:45 +00:00
|
|
|
user-wrap=echo "\#!/bin/sh" > ~/bin/"$1" \
|
2015-10-31 19:50:49 +00:00
|
|
|
; echo "${PWD}/env.sh '${PREFIX}' '$1' \"\$$@\"" >> ~/bin/"$1" \
|
2015-08-31 21:46:13 +00:00
|
|
|
; chmod +x ~/bin/"$1" ;
|
2014-12-22 03:50:08 +00:00
|
|
|
|
|
|
|
user-install:
|
|
|
|
mkdir -p ~/bin
|
|
|
|
$(foreach mod,$(R2BINS),$(call user-wrap,$(mod)))
|
2015-09-08 13:53:06 +00:00
|
|
|
cd ~/bin ; ln -fs radare2 r2
|
2014-12-22 03:50:08 +00:00
|
|
|
|
|
|
|
user-uninstall:
|
2015-10-26 21:33:45 +00:00
|
|
|
$(foreach mod,$(R2BINS),rm -f ~/bin/"$(mod)")
|
2015-09-08 21:47:45 +00:00
|
|
|
rm -f ~/bin/r2
|
2014-12-22 03:50:08 +00:00
|
|
|
-rmdir ~/bin
|
|
|
|
|
2012-02-17 12:23:58 +00:00
|
|
|
purge-dev:
|
2015-10-26 21:33:45 +00:00
|
|
|
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}/-"*
|
2014-10-04 12:54:35 +00:00
|
|
|
|
2014-11-22 01:51:35 +00:00
|
|
|
strip:
|
2015-10-26 21:33:45 +00:00
|
|
|
-for FILE in ${R2BINS} ; do ${STRIP} -s "${DESTDIR}${BINDIR}/$$FILE" 2> /dev/null ; done
|
|
|
|
-for FILE in "${DESTDIR}${LIBDIR}/libr_"*".${EXT_SO}" "${DESTDIR}${LIBDIR}/libr2.${EXT_SO}" ; do \
|
|
|
|
${STRIP} -s "$$FILE" ; done
|
2012-02-17 12:23:58 +00:00
|
|
|
|
2016-01-27 02:02:11 +00:00
|
|
|
purge: purge-doc purge-dev user-uninstall
|
2015-10-26 21:33:45 +00:00
|
|
|
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"
|
2009-03-06 00:38:23 +00:00
|
|
|
|
2016-02-24 17:11:45 +00:00
|
|
|
R2V=radare2-${VERSION}
|
2016-02-23 01:47:49 +00:00
|
|
|
|
2009-03-05 12:15:28 +00:00
|
|
|
dist:
|
2016-02-24 17:11:45 +00:00
|
|
|
rm -rf $(R2V)
|
|
|
|
git clone . $(R2V)
|
2016-02-26 10:44:52 +00:00
|
|
|
-cd $(R2V) && [ ! -f config-user.mk -o configure -nt config-user.mk ] && ./configure "--prefix=${PREFIX}"
|
2016-02-24 17:11:45 +00:00
|
|
|
cd $(R2V) ; git log $$(git show-ref | grep ${PREVIOUS_RELEASE} | awk '{print $$1}')..HEAD > ChangeLog
|
2016-02-26 10:44:52 +00:00
|
|
|
$(MAKE) -C $(R2V)/shlr capstone-sync
|
2016-02-24 17:11:45 +00:00
|
|
|
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" ; \
|
2016-02-23 01:47:49 +00:00
|
|
|
${CZ} "radare2-${VERSION}.tar"
|
|
|
|
|
|
|
|
olddist:
|
2015-10-26 21:33:45 +00:00
|
|
|
-[ configure -nt config-user.mk ] && ./configure "--prefix=${PREFIX}"
|
2016-01-20 02:44:59 +00:00
|
|
|
#git log $$(git show-ref `git tag |tail -n1`)..HEAD > ChangeLog
|
|
|
|
git log $$(git show-ref | grep ${PREVIOUS_RELEASE} | awk '{print $$1}')..HEAD > ChangeLog
|
2014-06-14 00:44:31 +00:00
|
|
|
cd shlr && ${MAKE} capstone-sync
|
2015-10-26 21:33:45 +00:00
|
|
|
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}" && \
|
2016-01-20 02:44:59 +00:00
|
|
|
${TAR} "radare2-${VERSION}.tar" $${FILES} $${CS_FILES} "radare2-${VERSION}/ChangeLog" ; \
|
2015-10-26 21:33:45 +00:00
|
|
|
${CZ} "radare2-${VERSION}.tar" ; \
|
|
|
|
mv "radare2-${VERSION}" "$${DIR}"
|
2009-04-25 11:29:39 +00:00
|
|
|
|
|
|
|
shot:
|
|
|
|
DATE=`date '+%Y%m%d'` ; \
|
2015-10-26 21:33:45 +00:00
|
|
|
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}" \
|
2013-07-07 21:03:10 +00:00
|
|
|
radare.org:/srv/http/radareorg/get/shot
|
2009-08-22 01:54:24 +00:00
|
|
|
|
2012-09-03 23:46:12 +00:00
|
|
|
tests:
|
2013-12-19 22:54:52 +00:00
|
|
|
@if [ -d $(R2R) ]; then \
|
|
|
|
cd $(R2R) ; git clean -xdf ; git pull ; \
|
2012-02-03 15:28:52 +00:00
|
|
|
else \
|
2015-10-26 21:33:45 +00:00
|
|
|
git clone --depth 1 "${R2R_URL}" "$(R2R)"; \
|
2012-02-03 15:28:52 +00:00
|
|
|
fi
|
2013-12-19 22:54:52 +00:00
|
|
|
cd $(R2R) ; ${MAKE}
|
2012-02-03 15:28:52 +00:00
|
|
|
|
2015-09-20 21:16:09 +00:00
|
|
|
osx-sign:
|
|
|
|
$(MAKE) -C binr/radare2 osx-sign
|
2016-01-22 19:53:01 +00:00
|
|
|
|
2015-09-22 13:25:56 +00:00
|
|
|
osx-sign-libs:
|
|
|
|
$(MAKE) -C binr/radare2 osx-sign-libs
|
2015-09-20 21:16:09 +00:00
|
|
|
|
2015-04-17 19:12:30 +00:00
|
|
|
quality:
|
|
|
|
./sys/shellcheck.sh
|
|
|
|
|
2016-03-25 10:10:16 +00:00
|
|
|
menu nconfig:
|
|
|
|
./sys/menu.sh || true
|
|
|
|
|
2016-04-04 10:16:06 +00:00
|
|
|
pie:
|
|
|
|
sys/pie.sh ${PREVIOUS_RELEASE}
|
|
|
|
|
2009-08-22 01:54:24 +00:00
|
|
|
include ${MKPLUGINS}
|
2009-03-05 12:15:28 +00:00
|
|
|
|
2014-11-22 01:51:35 +00:00
|
|
|
.PHONY: all clean distclean mrproper install symstall uninstall deinstall strip
|
2015-04-18 08:35:57 +00:00
|
|
|
.PHONY: libr binr install-man w32dist tests dist shot pkgcfg depgraph.png love
|