2009-04-01 08:28:13 +08:00
|
|
|
include config-user.mk
|
2010-01-15 08:32:28 +08:00
|
|
|
include global.mk
|
2009-03-05 20:15:28 +08:00
|
|
|
|
2011-07-19 06:26:11 +08:00
|
|
|
ifneq ($(shell tar --help 2>/dev/null|grep gnu.org),)
|
2011-07-19 06:12:36 +08:00
|
|
|
TAR=tar -czv --format=posix -f
|
|
|
|
else
|
|
|
|
TAR=tar -czvf
|
|
|
|
endif
|
2011-05-15 10:31:08 +08:00
|
|
|
PWD=$(shell pwd)
|
2010-10-29 09:38:43 +08:00
|
|
|
REMOTE=radare.org:/srv/http/radareorg/get/beta
|
|
|
|
|
2010-10-29 09:10:10 +08:00
|
|
|
all: plugins.cfg
|
|
|
|
${MAKE} libr
|
|
|
|
${MAKE} binr
|
2010-01-14 06:42:49 +08:00
|
|
|
|
|
|
|
plugins.cfg:
|
2011-05-16 07:47:01 +08:00
|
|
|
@if [ ! -e config-user.mk ]; then echo ; \
|
|
|
|
echo " Please, run ./configure first" ; echo ; exit 1 ; fi
|
2010-01-14 06:42:49 +08:00
|
|
|
./configure-plugins
|
2010-01-13 02:57:33 +08:00
|
|
|
|
2011-07-15 18:48:46 +08:00
|
|
|
gitpush:
|
|
|
|
sh mk/gitpush.sh
|
|
|
|
|
2010-01-13 02:57:33 +08:00
|
|
|
libr:
|
2009-07-16 08:30:20 +08:00
|
|
|
cd libr && ${MAKE} all
|
2009-02-06 05:08:46 +08:00
|
|
|
|
2010-05-28 23:15:20 +08:00
|
|
|
binr:
|
|
|
|
cd binr && ${MAKE} all
|
|
|
|
|
2010-10-18 07:51:00 +08:00
|
|
|
w32:
|
2010-10-29 09:38:43 +08:00
|
|
|
make clean
|
2010-10-18 07:51:00 +08:00
|
|
|
# TODO: add support for debian
|
2010-10-28 20:11:19 +08:00
|
|
|
./configure --without-ssl --without-gmp --with-compiler=i486-mingw32-gcc --with-ostype=windows --host=i486-unknown-windows
|
2010-10-18 07:51:00 +08:00
|
|
|
make
|
|
|
|
|
2010-01-16 00:02:04 +08:00
|
|
|
w32dist:
|
2010-04-12 08:22:52 +08:00
|
|
|
rm -rf radare2-w32-${VERSION} w32dist
|
2010-01-16 00:02:04 +08:00
|
|
|
mkdir w32dist
|
2010-11-17 07:56:48 +08:00
|
|
|
for a in `find binr libr | grep -e exe$$ -e dll$$`; do cp $$a w32dist ; done
|
2010-06-28 08:12:35 +08:00
|
|
|
rm w32dist/plugin.dll
|
2010-01-16 00:02:04 +08:00
|
|
|
mv w32dist radare2-w32-${VERSION}
|
|
|
|
zip -r radare2-w32-${VERSION}.zip radare2-w32-${VERSION}
|
|
|
|
|
2010-10-29 09:38:43 +08:00
|
|
|
w32beta: w32dist
|
|
|
|
scp radare2-w32-${VERSION}.zip ${REMOTE}
|
2011-05-18 07:35:52 +08:00
|
|
|
cd r2-bindings ; $(MAKE) w32dist
|
|
|
|
scp radare2-bindings-w32-${VERSION}.zip ${REMOTE}
|
2010-10-29 09:38:43 +08:00
|
|
|
|
2010-01-14 06:42:49 +08:00
|
|
|
clean:
|
2010-01-22 21:19:10 +08:00
|
|
|
cd libr && ${MAKE} clean
|
2010-06-15 00:29:52 +08:00
|
|
|
cd binr && ${MAKE} clean
|
2010-01-14 06:42:49 +08:00
|
|
|
|
2010-07-13 17:59:55 +08:00
|
|
|
mrproper:
|
2010-01-22 21:19:10 +08:00
|
|
|
cd libr && ${MAKE} mrproper
|
2010-06-15 00:29:52 +08:00
|
|
|
cd binr && ${MAKE} mrproper
|
2010-06-15 20:10:42 +08:00
|
|
|
rm -f config-user.mk plugins.cfg libr/config.h libr/include/r_userconf.h libr/config.mk
|
|
|
|
rm -f pkgcfg/*.pc
|
2009-06-15 10:44:05 +08:00
|
|
|
|
2011-03-02 19:33:28 +08:00
|
|
|
mrpopper:
|
|
|
|
@echo 8====================D
|
|
|
|
|
2009-07-16 08:30:20 +08:00
|
|
|
pkgcfg:
|
2010-01-22 21:19:10 +08:00
|
|
|
cd libr && ${MAKE} pkgcfg
|
2009-07-16 08:30:20 +08:00
|
|
|
|
2010-03-13 01:46:11 +08:00
|
|
|
install-man:
|
2011-07-03 19:06:16 +08:00
|
|
|
mkdir -p ${MDR}/man1
|
|
|
|
for a in man/*.1 ; do ${INSTALL_MAN} $$a ${MDR}/man1 ; done
|
|
|
|
cd ${MDR}/man1 && ln -fs radare2.1 r2.1
|
2010-06-18 23:52:30 +08:00
|
|
|
|
|
|
|
install-man-symlink:
|
2011-07-03 19:06:16 +08:00
|
|
|
mkdir -p ${MDR}/man1
|
2011-07-13 17:30:25 +08:00
|
|
|
cd man && for a in *.1 ; do ln -fs ${PWD}/man/$$a ${MDR}/man1/$$a ; done
|
2011-07-03 19:06:16 +08:00
|
|
|
cd ${MDR}/man1 && ln -fs radare2.1 r2.1
|
2010-03-13 01:46:11 +08:00
|
|
|
|
2011-02-17 08:22:15 +08:00
|
|
|
install-doc:
|
2011-03-14 03:27:28 +08:00
|
|
|
${INSTALL_DIR} ${PFX}/share/doc/radare2
|
|
|
|
for a in doc/* ; do ${INSTALL_DATA} $$a ${PFX}/share/doc/radare2 ; done
|
2011-02-17 08:22:15 +08:00
|
|
|
|
|
|
|
install-doc-symlink:
|
2011-03-14 03:27:28 +08:00
|
|
|
${INSTALL_DIR} ${PFX}/share/doc/radare2
|
2011-05-15 10:31:08 +08:00
|
|
|
cd doc ; for a in * ; do ln -fs ${PWD}/$$a ${PFX}/share/doc/radare2 ; done
|
2011-02-17 08:22:15 +08:00
|
|
|
|
|
|
|
install: install-doc install-man
|
2010-02-22 03:21:36 +08:00
|
|
|
cd libr && ${MAKE} install PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
2010-05-29 09:30:36 +08:00
|
|
|
cd binr && ${MAKE} install PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
2009-02-06 05:28:33 +08:00
|
|
|
|
2011-02-28 04:56:13 +08:00
|
|
|
install-pkgconfig-symlink:
|
2011-07-19 17:25:11 +08:00
|
|
|
@${INSTALL_DIR} ${DESTDIR}/${LIBDIR}/pkgconfig
|
|
|
|
cd pkgcfg ; for a in *.pc ; do ln -fs $${PWD}/$$a ${DESTDIR}/${LIBDIR}/pkgconfig/$$a ; done
|
2011-02-28 04:56:13 +08:00
|
|
|
|
|
|
|
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink
|
2010-05-24 23:51:51 +08:00
|
|
|
cd libr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
2010-06-15 19:10:46 +08:00
|
|
|
cd binr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
2010-05-24 23:51:51 +08:00
|
|
|
|
2011-03-28 16:24:01 +08:00
|
|
|
deinstall uninstall:
|
2010-02-22 03:21:36 +08:00
|
|
|
cd libr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
2010-06-15 19:10:46 +08:00
|
|
|
cd binr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
|
2011-03-28 16:24:01 +08:00
|
|
|
@echo
|
|
|
|
@echo "Run 'make purge' to also remove installed files from previous versions of r2"
|
|
|
|
@echo
|
|
|
|
|
|
|
|
purge:
|
2011-07-19 17:25:11 +08:00
|
|
|
rm -rf ${DESTDIR}/${LIBDIR}/libr_*
|
|
|
|
rm -rf ${DESTDIR}/${LIBDIR}/radare2
|
|
|
|
rm -rf ${DESTDIR}/${INCLUDEDIR}/libr
|
2011-07-13 17:30:25 +08:00
|
|
|
cd man ; for a in *.1 ; do rm -f ${MDR}/man1/$$a ; done
|
|
|
|
rm -f ${MDR}/man1/r2.1
|
2009-03-06 08:38:23 +08:00
|
|
|
|
2011-05-18 07:35:52 +08:00
|
|
|
beta: dist r2-bindings-dist
|
2010-10-28 09:30:15 +08:00
|
|
|
scp ../radare2-${VERSION}.tar.gz ${REMOTE}
|
2011-07-19 17:25:11 +08:00
|
|
|
scp r2-bindings-${VERSION}.tar.gz ${REMOTE}
|
2010-10-28 09:30:15 +08:00
|
|
|
|
2011-05-18 07:35:52 +08:00
|
|
|
r2-bindings-dist:
|
|
|
|
cd r2-bindings && ${MAKE} dist
|
2010-03-15 02:36:44 +08:00
|
|
|
|
2009-03-05 20:15:28 +08:00
|
|
|
dist:
|
2009-04-26 03:43:47 +08:00
|
|
|
VERSION=${VERSION} ; \
|
2011-05-18 07:35:52 +08:00
|
|
|
FILES=`hg st -mc .| cut -c 3-|sed -e s,^,radare2-${VERSION}/, | grep -v r2-bindings | grep -v '/\.'` ; \
|
2009-03-05 20:15:28 +08:00
|
|
|
cd .. && mv radare2 radare2-${VERSION} && \
|
2011-07-19 06:12:36 +08:00
|
|
|
${TAR} radare2-${VERSION}.tar.gz $${FILES} ;\
|
2009-03-05 20:15:28 +08:00
|
|
|
mv radare2-${VERSION} radare2
|
2010-10-28 09:30:15 +08:00
|
|
|
|
|
|
|
pub:
|
|
|
|
scp ../radare2-${VERSION}.tar.gz radare.org:/srv/http/radareorg/get
|
2009-04-25 19:29:39 +08:00
|
|
|
|
|
|
|
shot:
|
|
|
|
DATE=`date '+%Y%m%d'` ; \
|
|
|
|
FILES=`hg status -mc|cut -c 3-|sed -e s,^,radare2-$${DATE}/,`; \
|
|
|
|
cd .. && mv radare2 radare2-$${DATE} && \
|
2011-07-19 06:12:36 +08:00
|
|
|
${TAR} radare2-$${DATE}.tar.gz $${FILES} ;\
|
2009-04-25 19:29:39 +08:00
|
|
|
mv radare2-$${DATE} radare2 && \
|
2009-09-25 10:13:40 +08:00
|
|
|
scp radare2-$${DATE}.tar.gz radare.org:/srv/http/radareorg/get/shot
|
2009-08-22 09:54:24 +08:00
|
|
|
|
|
|
|
include ${MKPLUGINS}
|
2009-03-05 20:15:28 +08:00
|
|
|
|
2011-05-18 07:35:52 +08:00
|
|
|
.PHONY: all clean mrproper install symstall uninstall deinstall dist shot pkgcfg r2-bindings r2-bindings-dist libr binr install-man
|