radare2/Makefile

232 lines
7.8 KiB
Makefile
Raw Normal View History

-include config-user.mk
include global.mk
DESTDIR:=$(call rmbdlslash,$(DESTDIR))
WWWROOT:=$(call rmbdlslash,$(WWWROOT))
R2R=radare2-regressions
R2R_URL=$(shell doc/repo REGRESSIONS)
DLIBDIR=$(call rmdblslash,$(DESTDIR)/$(LIBDIR))
WWWROOT=${DATADIR}/radare2/${VERSION}/www
R2BINS=$(shell cd binr ; echo r*2 r2agent)
DATADIRS=libr/cons/d libr/bin/d libr/asm/d libr/syscall/d libr/magic/d
YARADIR=$(call rmdblslash,${DESTDIR}/${PREFIX}/share/radare2/${VERSION}/yara)
#binr/ragg2/d
2012-02-17 12:55:54 +00:00
STRIP?=strip
2013-07-07 21:03:10 +00:00
#ifneq ($(shell bsdtar -h 2>/dev/null|grep bsdtar),)
ifneq ($(shell xz --help 2>/dev/null|grep improve),)
TAR=tar -cvf
TAREXT=tar.xz
CZ=xz -f
else
2013-07-07 21:03:10 +00:00
TAR=bsdtar cvf
TAREXT=tar.gz
CZ=gzip -f
endif
2014-09-01 13:50:04 +00:00
PWD=$(shell pwd)
all: plugins.cfg
${MAKE} -C shlr/zip
${MAKE} -C libr/util
2014-07-17 08:34:53 +00:00
${MAKE} -C libr/socket
${MAKE} -C shlr
${MAKE} -C libr
${MAKE} -C binr
* Initial import of the 'configure-plugins' script - accepts --static and --shared to setup which plugins you want to build statically in the library or dynamically - normalize .mk and plugin file names to adopt a single standard - WARNING: huge commit * Added 'mk/sloc.mk' with 'sloc' target to count lines with sloccount everywhere (yeah!) --HG-- rename : libr/asm/p/x86bea.mk => libr/asm/p/x86_bea.mk rename : libr/asm/p/x86nasm.mk => libr/asm/p/x86_nasm.mk rename : libr/asm/p/x86olly.mk => libr/asm/p/x86_olly.mk rename : libr/config.h => libr/config.h.head rename : libr/config.mk => libr/config.mk.head rename : libr/debug/p/dbg_gdb.c => libr/debug/p/debug_gdb.c rename : libr/debug/p/dbg_ptrace.c => libr/debug/p/debug_ptrace.c rename : libr/debug/p/dbg_libgdbwrap/Makefile => libr/debug/p/libgdbwrap/Makefile rename : libr/debug/p/dbg_libgdbwrap/README => libr/debug/p/libgdbwrap/README rename : libr/debug/p/dbg_libgdbwrap/client.c => libr/debug/p/libgdbwrap/client.c rename : libr/debug/p/dbg_libgdbwrap/gdbwrapper.c => libr/debug/p/libgdbwrap/gdbwrapper.c rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-internals.h => libr/debug/p/libgdbwrap/include/gdbwrapper-internals.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-stddef.h => libr/debug/p/libgdbwrap/include/gdbwrapper-stddef.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper.h => libr/debug/p/libgdbwrap/include/gdbwrapper.h rename : libr/debug/p/dbg_libgdbwrap/include/libaspect.h => libr/debug/p/libgdbwrap/include/libaspect.h rename : libr/debug/p/dbg_libgdbwrap/include/libe2dbg.h => libr/debug/p/libgdbwrap/include/libe2dbg.h rename : libr/debug/p/dbg_libgdbwrap/include/revm.h => libr/debug/p/libgdbwrap/include/revm.h rename : libr/debug/p/dbg_libgdbwrap/interface.c => libr/debug/p/libgdbwrap/interface.c rename : libr/io/p/dbg.mk => libr/io/p/debug.mk rename : libr/io/p/io_dbg.c => libr/io/p/io_debug.c
2010-01-13 22:42:49 +00:00
plugins.cfg:
@if [ ! -e config-user.mk ]; then echo ; \
echo " Please, run ./configure first" ; echo ; exit 1 ; fi
* Initial import of the 'configure-plugins' script - accepts --static and --shared to setup which plugins you want to build statically in the library or dynamically - normalize .mk and plugin file names to adopt a single standard - WARNING: huge commit * Added 'mk/sloc.mk' with 'sloc' target to count lines with sloccount everywhere (yeah!) --HG-- rename : libr/asm/p/x86bea.mk => libr/asm/p/x86_bea.mk rename : libr/asm/p/x86nasm.mk => libr/asm/p/x86_nasm.mk rename : libr/asm/p/x86olly.mk => libr/asm/p/x86_olly.mk rename : libr/config.h => libr/config.h.head rename : libr/config.mk => libr/config.mk.head rename : libr/debug/p/dbg_gdb.c => libr/debug/p/debug_gdb.c rename : libr/debug/p/dbg_ptrace.c => libr/debug/p/debug_ptrace.c rename : libr/debug/p/dbg_libgdbwrap/Makefile => libr/debug/p/libgdbwrap/Makefile rename : libr/debug/p/dbg_libgdbwrap/README => libr/debug/p/libgdbwrap/README rename : libr/debug/p/dbg_libgdbwrap/client.c => libr/debug/p/libgdbwrap/client.c rename : libr/debug/p/dbg_libgdbwrap/gdbwrapper.c => libr/debug/p/libgdbwrap/gdbwrapper.c rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-internals.h => libr/debug/p/libgdbwrap/include/gdbwrapper-internals.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-stddef.h => libr/debug/p/libgdbwrap/include/gdbwrapper-stddef.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper.h => libr/debug/p/libgdbwrap/include/gdbwrapper.h rename : libr/debug/p/dbg_libgdbwrap/include/libaspect.h => libr/debug/p/libgdbwrap/include/libaspect.h rename : libr/debug/p/dbg_libgdbwrap/include/libe2dbg.h => libr/debug/p/libgdbwrap/include/libe2dbg.h rename : libr/debug/p/dbg_libgdbwrap/include/revm.h => libr/debug/p/libgdbwrap/include/revm.h rename : libr/debug/p/dbg_libgdbwrap/interface.c => libr/debug/p/libgdbwrap/interface.c rename : libr/io/p/dbg.mk => libr/io/p/debug.mk rename : libr/io/p/io_dbg.c => libr/io/p/io_debug.c
2010-01-13 22:42:49 +00:00
./configure-plugins
w32:
sys/mingw32.sh
depgraph.png:
cd libr ; perl depgraph.pl | dot -Tpng -odepgraph.png
android:
@if [ -z "$(NDK_ARCH)" ]; then echo "Set NDK_ARCH=[arm|mips|x86]" ; false; fi
sys/android-${NDK_ARCH}.sh
w32dist:
rm -rf radare2-w32-${VERSION} w32dist
mkdir w32dist
for a in `find libr | grep -e dll$$`; do cp $$a w32dist ; done
for a in `find binr | grep -e exe$$`; do cp $$a w32dist ; done
2013-01-23 13:50:50 +00:00
rm -f w32dist/plugin.dll
mkdir -p w32dist/www
cp -rf shlr/www/* w32dist/www
mkdir -p w32dist/radare2/${VERSION}/magic
cp -f libr/magic/d/default/* w32dist/radare2/${VERSION}/magic
mkdir -p w32dist/radare2/${VERSION}/syscall
cp -f libr/syscall/d/*.sdb w32dist/radare2/${VERSION}/syscall
mkdir -p w32dist/radare2/${VERSION}/opcodes
cp -f libr/asm/d/*.sdb w32dist/radare2/${VERSION}/opcodes
mkdir -p w32dist/share/doc/radare2
* Install includes in windows dist * Import linux-x86-32/64 and darwin-x86-32 sflib includedirs * Simplify data installation for magic, egg, syscall and asm * Set R2_INCDIR in r_userconf * Make ragg2-cc much smarter - use ragg2 -v to get paths and version - accept new flags -a -b -k for arch, bits and kernel - supports crosscompilation --HG-- rename : libr/magic/d/OpenBSD => libr/magic/d/default/OpenBSD rename : libr/magic/d/archive => libr/magic/d/default/archive rename : libr/magic/d/cafebabe => libr/magic/d/default/cafebabe rename : libr/magic/d/cisco => libr/magic/d/default/cisco rename : libr/magic/d/database => libr/magic/d/default/database rename : libr/magic/d/editors => libr/magic/d/default/editors rename : libr/magic/d/elf => libr/magic/d/default/elf rename : libr/magic/d/filesystems => libr/magic/d/default/filesystems rename : libr/magic/d/flash => libr/magic/d/default/flash rename : libr/magic/d/freebsd => libr/magic/d/default/freebsd rename : libr/magic/d/gimp => libr/magic/d/default/gimp rename : libr/magic/d/images => libr/magic/d/default/images rename : libr/magic/d/java => libr/magic/d/default/java rename : libr/magic/d/jpeg => libr/magic/d/default/jpeg rename : libr/magic/d/linux => libr/magic/d/default/linux rename : libr/magic/d/mail.news => libr/magic/d/default/mail.news rename : libr/magic/d/matroska => libr/magic/d/default/matroska rename : libr/magic/d/mime => libr/magic/d/default/mime rename : libr/magic/d/msdos => libr/magic/d/default/msdos rename : libr/magic/d/netbsd => libr/magic/d/default/netbsd rename : libr/magic/d/pdf => libr/magic/d/default/pdf rename : libr/magic/d/perl => libr/magic/d/default/perl rename : libr/magic/d/python => libr/magic/d/default/python rename : libr/magic/d/riff => libr/magic/d/default/riff rename : libr/magic/d/sniffer => libr/magic/d/default/sniffer rename : libr/magic/d/sql => libr/magic/d/default/sql rename : libr/magic/d/sun => libr/magic/d/default/sun rename : libr/magic/d/uuencode => libr/magic/d/default/uuencode
2011-11-29 02:14:27 +00:00
mkdir -p w32dist/include/libr
cp libr/include/*.h w32dist/include/libr
#mkdir -p w32dist/include/libr/sflib
cp -f doc/fortunes w32dist/share/doc/radare2
mv w32dist radare2-w32-${VERSION}
rm -f radare2-w32-${VERSION}.zip
zip -r radare2-w32-${VERSION}.zip radare2-w32-${VERSION}
* Initial import of the 'configure-plugins' script - accepts --static and --shared to setup which plugins you want to build statically in the library or dynamically - normalize .mk and plugin file names to adopt a single standard - WARNING: huge commit * Added 'mk/sloc.mk' with 'sloc' target to count lines with sloccount everywhere (yeah!) --HG-- rename : libr/asm/p/x86bea.mk => libr/asm/p/x86_bea.mk rename : libr/asm/p/x86nasm.mk => libr/asm/p/x86_nasm.mk rename : libr/asm/p/x86olly.mk => libr/asm/p/x86_olly.mk rename : libr/config.h => libr/config.h.head rename : libr/config.mk => libr/config.mk.head rename : libr/debug/p/dbg_gdb.c => libr/debug/p/debug_gdb.c rename : libr/debug/p/dbg_ptrace.c => libr/debug/p/debug_ptrace.c rename : libr/debug/p/dbg_libgdbwrap/Makefile => libr/debug/p/libgdbwrap/Makefile rename : libr/debug/p/dbg_libgdbwrap/README => libr/debug/p/libgdbwrap/README rename : libr/debug/p/dbg_libgdbwrap/client.c => libr/debug/p/libgdbwrap/client.c rename : libr/debug/p/dbg_libgdbwrap/gdbwrapper.c => libr/debug/p/libgdbwrap/gdbwrapper.c rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-internals.h => libr/debug/p/libgdbwrap/include/gdbwrapper-internals.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-stddef.h => libr/debug/p/libgdbwrap/include/gdbwrapper-stddef.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper.h => libr/debug/p/libgdbwrap/include/gdbwrapper.h rename : libr/debug/p/dbg_libgdbwrap/include/libaspect.h => libr/debug/p/libgdbwrap/include/libaspect.h rename : libr/debug/p/dbg_libgdbwrap/include/libe2dbg.h => libr/debug/p/libgdbwrap/include/libe2dbg.h rename : libr/debug/p/dbg_libgdbwrap/include/revm.h => libr/debug/p/libgdbwrap/include/revm.h rename : libr/debug/p/dbg_libgdbwrap/interface.c => libr/debug/p/libgdbwrap/interface.c rename : libr/io/p/dbg.mk => libr/io/p/debug.mk rename : libr/io/p/io_dbg.c => libr/io/p/io_debug.c
2010-01-13 22:42:49 +00:00
clean:
for a in shlr libr binr ; do (cd $$a ; ${MAKE} clean) ; done
* Initial import of the 'configure-plugins' script - accepts --static and --shared to setup which plugins you want to build statically in the library or dynamically - normalize .mk and plugin file names to adopt a single standard - WARNING: huge commit * Added 'mk/sloc.mk' with 'sloc' target to count lines with sloccount everywhere (yeah!) --HG-- rename : libr/asm/p/x86bea.mk => libr/asm/p/x86_bea.mk rename : libr/asm/p/x86nasm.mk => libr/asm/p/x86_nasm.mk rename : libr/asm/p/x86olly.mk => libr/asm/p/x86_olly.mk rename : libr/config.h => libr/config.h.head rename : libr/config.mk => libr/config.mk.head rename : libr/debug/p/dbg_gdb.c => libr/debug/p/debug_gdb.c rename : libr/debug/p/dbg_ptrace.c => libr/debug/p/debug_ptrace.c rename : libr/debug/p/dbg_libgdbwrap/Makefile => libr/debug/p/libgdbwrap/Makefile rename : libr/debug/p/dbg_libgdbwrap/README => libr/debug/p/libgdbwrap/README rename : libr/debug/p/dbg_libgdbwrap/client.c => libr/debug/p/libgdbwrap/client.c rename : libr/debug/p/dbg_libgdbwrap/gdbwrapper.c => libr/debug/p/libgdbwrap/gdbwrapper.c rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-internals.h => libr/debug/p/libgdbwrap/include/gdbwrapper-internals.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper-stddef.h => libr/debug/p/libgdbwrap/include/gdbwrapper-stddef.h rename : libr/debug/p/dbg_libgdbwrap/include/gdbwrapper.h => libr/debug/p/libgdbwrap/include/gdbwrapper.h rename : libr/debug/p/dbg_libgdbwrap/include/libaspect.h => libr/debug/p/libgdbwrap/include/libaspect.h rename : libr/debug/p/dbg_libgdbwrap/include/libe2dbg.h => libr/debug/p/libgdbwrap/include/libe2dbg.h rename : libr/debug/p/dbg_libgdbwrap/include/revm.h => libr/debug/p/libgdbwrap/include/revm.h rename : libr/debug/p/dbg_libgdbwrap/interface.c => libr/debug/p/libgdbwrap/interface.c rename : libr/io/p/dbg.mk => libr/io/p/debug.mk rename : libr/io/p/io_dbg.c => libr/io/p/io_debug.c
2010-01-13 22:42:49 +00:00
distclean mrproper:
for a in libr binr shlr ; do ( cd $$a ; ${MAKE} mrproper) ; done
rm -f config-user.mk plugins.cfg libr/config.h
rm -f libr/include/r_userconf.h libr/config.mk
rm -f pkgcfg/*.pc
2009-06-15 02:44:05 +00:00
pkgcfg:
cd libr && ${MAKE} pkgcfg
install-man:
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
install-man-symlink:
mkdir -p "${MDR}/man1"
cd man && for a in *.1 ; do \
ln -fs "${PWD}/man/$$a" "${MDR}/man1/$$a" ; done
cd "${MDR}/man1" && ln -fs radare2.1 r2.1
install-doc:
${INSTALL_DIR} "${PFX}/share/doc/radare2"
for a in doc/* ; do ${INSTALL_DATA} $$a "${PFX}/share/doc/radare2" ; done
install-doc-symlink:
${INSTALL_DIR} "${PFX}/share/doc/radare2"
cd doc ; for a in * ; do \
ln -fs "${PWD}/doc/$$a" "${PFX}/share/doc/radare2" ; done
install: install-doc install-man install-www
cd libr && ${MAKE} install PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" PARENT=1
cd binr && ${MAKE} install PREFIX="${PREFIX}" DESTDIR="${DESTDIR}"
cd shlr && ${MAKE} install PREFIX="${PREFIX}" DESTDIR="${DESTDIR}"
* Install includes in windows dist * Import linux-x86-32/64 and darwin-x86-32 sflib includedirs * Simplify data installation for magic, egg, syscall and asm * Set R2_INCDIR in r_userconf * Make ragg2-cc much smarter - use ragg2 -v to get paths and version - accept new flags -a -b -k for arch, bits and kernel - supports crosscompilation --HG-- rename : libr/magic/d/OpenBSD => libr/magic/d/default/OpenBSD rename : libr/magic/d/archive => libr/magic/d/default/archive rename : libr/magic/d/cafebabe => libr/magic/d/default/cafebabe rename : libr/magic/d/cisco => libr/magic/d/default/cisco rename : libr/magic/d/database => libr/magic/d/default/database rename : libr/magic/d/editors => libr/magic/d/default/editors rename : libr/magic/d/elf => libr/magic/d/default/elf rename : libr/magic/d/filesystems => libr/magic/d/default/filesystems rename : libr/magic/d/flash => libr/magic/d/default/flash rename : libr/magic/d/freebsd => libr/magic/d/default/freebsd rename : libr/magic/d/gimp => libr/magic/d/default/gimp rename : libr/magic/d/images => libr/magic/d/default/images rename : libr/magic/d/java => libr/magic/d/default/java rename : libr/magic/d/jpeg => libr/magic/d/default/jpeg rename : libr/magic/d/linux => libr/magic/d/default/linux rename : libr/magic/d/mail.news => libr/magic/d/default/mail.news rename : libr/magic/d/matroska => libr/magic/d/default/matroska rename : libr/magic/d/mime => libr/magic/d/default/mime rename : libr/magic/d/msdos => libr/magic/d/default/msdos rename : libr/magic/d/netbsd => libr/magic/d/default/netbsd rename : libr/magic/d/pdf => libr/magic/d/default/pdf rename : libr/magic/d/perl => libr/magic/d/default/perl rename : libr/magic/d/python => libr/magic/d/default/python rename : libr/magic/d/riff => libr/magic/d/default/riff rename : libr/magic/d/sniffer => libr/magic/d/default/sniffer rename : libr/magic/d/sql => libr/magic/d/default/sql rename : libr/magic/d/sun => libr/magic/d/default/sun rename : libr/magic/d/uuencode => libr/magic/d/default/uuencode
2011-11-29 02:14:27 +00:00
for a in ${DATADIRS} ; do \
(cd $$a ; ${MAKE} install LIBDIR="${LIBDIR}" PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" ); \
* Install includes in windows dist * Import linux-x86-32/64 and darwin-x86-32 sflib includedirs * Simplify data installation for magic, egg, syscall and asm * Set R2_INCDIR in r_userconf * Make ragg2-cc much smarter - use ragg2 -v to get paths and version - accept new flags -a -b -k for arch, bits and kernel - supports crosscompilation --HG-- rename : libr/magic/d/OpenBSD => libr/magic/d/default/OpenBSD rename : libr/magic/d/archive => libr/magic/d/default/archive rename : libr/magic/d/cafebabe => libr/magic/d/default/cafebabe rename : libr/magic/d/cisco => libr/magic/d/default/cisco rename : libr/magic/d/database => libr/magic/d/default/database rename : libr/magic/d/editors => libr/magic/d/default/editors rename : libr/magic/d/elf => libr/magic/d/default/elf rename : libr/magic/d/filesystems => libr/magic/d/default/filesystems rename : libr/magic/d/flash => libr/magic/d/default/flash rename : libr/magic/d/freebsd => libr/magic/d/default/freebsd rename : libr/magic/d/gimp => libr/magic/d/default/gimp rename : libr/magic/d/images => libr/magic/d/default/images rename : libr/magic/d/java => libr/magic/d/default/java rename : libr/magic/d/jpeg => libr/magic/d/default/jpeg rename : libr/magic/d/linux => libr/magic/d/default/linux rename : libr/magic/d/mail.news => libr/magic/d/default/mail.news rename : libr/magic/d/matroska => libr/magic/d/default/matroska rename : libr/magic/d/mime => libr/magic/d/default/mime rename : libr/magic/d/msdos => libr/magic/d/default/msdos rename : libr/magic/d/netbsd => libr/magic/d/default/netbsd rename : libr/magic/d/pdf => libr/magic/d/default/pdf rename : libr/magic/d/perl => libr/magic/d/default/perl rename : libr/magic/d/python => libr/magic/d/default/python rename : libr/magic/d/riff => libr/magic/d/default/riff rename : libr/magic/d/sniffer => libr/magic/d/default/sniffer rename : libr/magic/d/sql => libr/magic/d/default/sql rename : libr/magic/d/sun => libr/magic/d/default/sun rename : libr/magic/d/uuencode => libr/magic/d/default/uuencode
2011-11-29 02:14:27 +00:00
done
mkdir -p "${DLIBDIR}/radare2/${VERSION}/hud"
cp -f doc/hud "${DLIBDIR}/radare2/${VERSION}/hud/main"
mkdir -p $(call rmdblslash,${DESTDIR}/${PREFIX}/share/radare2/${VERSION}/)
cp -fr shlr/yara/ "$(YARADIR)"
#cp ${PWD}/libr/lang/p/radare.lua ${DLIBDIR}/radare2/${VERSION}/radare.lua
sys/ldconfig.sh
install-www:
rm -rf $(call rmdblslash,${DESTDIR}/${WWWROOT})
rm -rf ${DLIBDIR}/radare2/${VERSION}/www # old dir
mkdir -p $(call rmdblslash,${DESTDIR}/${WWWROOT})
cp -rf shlr/www/* $(call rmdblslash,${DESTDIR}/${WWWROOT})
WWWDIR=$(call rmdblslash,${DESTDIR}/${DATADIR}/radare2/${VERSION}/www)
symstall-www:
rm -rf $(call rmdblslash,${DESTDIR}/${WWWROOT})
rm -rf ${DLIBDIR}/radare2/${VERSION}/www # old dir
mkdir -p "$(call rmdblslash,${DESTDIR}/${WWWROOT})"
cd $(call rmdblslash,${DESTDIR}/${WWWROOT}) ; \
for a in "${PWD}/shlr/www/"* ; do \
ln -fs $$a "$(WWWDIR)" ; done
install-pkgconfig-symlink:
@${INSTALL_DIR} "${DLIBDIR}/pkgconfig"
cd pkgcfg ; for a in *.pc ; do \
ln -fs "$${PWD}/$$a" "${DLIBDIR}/pkgconfig/$$a" ; done
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink symstall-www
cd libr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR="${DESTDIR}"
cd binr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR="${DESTDIR}"
cd shlr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR="${DESTDIR}"
for a in ${DATADIRS} ; do (\
cd $$a ; \
echo $$a ; \
${MAKE} install-symlink LIBDIR="${LIBDIR}" \
PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" ); \
* Install includes in windows dist * Import linux-x86-32/64 and darwin-x86-32 sflib includedirs * Simplify data installation for magic, egg, syscall and asm * Set R2_INCDIR in r_userconf * Make ragg2-cc much smarter - use ragg2 -v to get paths and version - accept new flags -a -b -k for arch, bits and kernel - supports crosscompilation --HG-- rename : libr/magic/d/OpenBSD => libr/magic/d/default/OpenBSD rename : libr/magic/d/archive => libr/magic/d/default/archive rename : libr/magic/d/cafebabe => libr/magic/d/default/cafebabe rename : libr/magic/d/cisco => libr/magic/d/default/cisco rename : libr/magic/d/database => libr/magic/d/default/database rename : libr/magic/d/editors => libr/magic/d/default/editors rename : libr/magic/d/elf => libr/magic/d/default/elf rename : libr/magic/d/filesystems => libr/magic/d/default/filesystems rename : libr/magic/d/flash => libr/magic/d/default/flash rename : libr/magic/d/freebsd => libr/magic/d/default/freebsd rename : libr/magic/d/gimp => libr/magic/d/default/gimp rename : libr/magic/d/images => libr/magic/d/default/images rename : libr/magic/d/java => libr/magic/d/default/java rename : libr/magic/d/jpeg => libr/magic/d/default/jpeg rename : libr/magic/d/linux => libr/magic/d/default/linux rename : libr/magic/d/mail.news => libr/magic/d/default/mail.news rename : libr/magic/d/matroska => libr/magic/d/default/matroska rename : libr/magic/d/mime => libr/magic/d/default/mime rename : libr/magic/d/msdos => libr/magic/d/default/msdos rename : libr/magic/d/netbsd => libr/magic/d/default/netbsd rename : libr/magic/d/pdf => libr/magic/d/default/pdf rename : libr/magic/d/perl => libr/magic/d/default/perl rename : libr/magic/d/python => libr/magic/d/default/python rename : libr/magic/d/riff => libr/magic/d/default/riff rename : libr/magic/d/sniffer => libr/magic/d/default/sniffer rename : libr/magic/d/sql => libr/magic/d/default/sql rename : libr/magic/d/sun => libr/magic/d/default/sun rename : libr/magic/d/uuencode => libr/magic/d/default/uuencode
2011-11-29 02:14:27 +00:00
done
mkdir -p "${DLIBDIR}/radare2/${VERSION}/hud"
cd "$(call rmdblslash,$(DESTDIR)/$(PREFIX)/lib/radare2/)" ;\
rm -f last ; ln -fs $(VERSION) last
cd "$(call rmdblslash,$(DESTDIR)/$(PREFIX)/share/radare2/)" ;\
rm -f last ; ln -fs $(VERSION) last
2014-09-06 00:22:38 +00:00
ln -fs "${PWD}/doc/hud" "${DLIBDIR}/radare2/${VERSION}/hud/main"
ln -fs "${PWD}/libr/lang/p/radare.lua" \
"${DLIBDIR}/radare2/${VERSION}/radare.lua"
mkdir -p "$(call rmdblslash,${DESTDIR}/${PREFIX}/share/radare2/${VERSION}/)"
rm -rf "$(YARADIR)"
ln -fs "${PWD}/shlr/yara/" "$(YARADIR)"
sys/ldconfig.sh
deinstall uninstall:
cd libr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
cd binr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
cd shlr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
cd libr/syscall/d && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR} LIBDIR=${LIBDIR}
@echo
@echo "Run 'make purge' to also remove installed files from previous versions of r2"
@echo
purge-doc:
rm -rf ${DESTDIR}/${PREFIX}/share/doc/radare2
cd man ; for a in *.1 ; do rm -f "${MDR}/man1/$$a" ; done
rm -f ${MDR}/man1/r2.1
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}/-*
purge-syms:
# XXX: this must be in purge-sym ?
-for a in ${R2BINS} ; do ${STRIP} -s ${DESTDIR}/${BINDIR}/$$a 2> /dev/null ; done
-for a in ${DESTDIR}/${LIBDIR}/libr_*.${EXT_SO} \
${DESTDIR}/${LIBDIR}/libr2.${EXT_SO} ; do ${STRIP} -s $$a ; done
purge: purge-doc purge-dev
for a in ${R2BINS} ; do rm -f ${DESTDIR}/${BINDIR}/$$a ; done
rm -f ${DESTDIR}/${BINDIR}/ragg2-cc
rm -f ${DESTDIR}/${BINDIR}/r2
2011-11-02 01:01:24 +00:00
rm -f ${DESTDIR}/${LIBDIR}/libr_*
rm -f ${DESTDIR}/${LIBDIR}/libr2.${EXT_SO}
rm -rf ${DESTDIR}/${LIBDIR}/radare2
rm -rf ${DESTDIR}/${INCLUDEDIR}/libr
dist:
-[ configure -nt config-user.mk ] && ./configure --prefix=${PREFIX}
git log $$(git show-ref `git tag |tail -n1`)..HEAD > ChangeLog
2014-06-14 00:44:31 +00:00
cd shlr && ${MAKE} capstone-sync
DIR=`basename $$PWD` ; \
FILES=`git ls-files | sed -e s,^,radare2-${VERSION}/,` ; \
CS_FILES=`cd shlr/capstone ; git ls-files | sed -e s,^,radare2-${VERSION}/shlr/capstone/,` ; \
cd .. && mv $${DIR} radare2-${VERSION} && \
${TAR} radare2-${VERSION}.tar $${FILES} $${CS_FILES} radare2-${VERSION}/ChangeLog ;\
2013-07-07 21:03:10 +00:00
${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} && \
2013-07-07 21:03:10 +00:00
${TAR} radare2-$${DATE}.tar $${FILES} ;\
${CZ} radare2-$${DATE}.tar ;\
mv radare2-$${DATE} radare2 && \
2013-07-07 21:03:10 +00:00
scp radare2-$${DATE}.${TAREXT} \
radare.org:/srv/http/radareorg/get/shot
tests:
@if [ -d $(R2R) ]; then \
cd $(R2R) ; git clean -xdf ; git pull ; \
else \
git clone ${R2R_URL} $(R2R); \
fi
cd $(R2R) ; ${MAKE}
include ${MKPLUGINS}
.PHONY: all clean distclean mrproper install symstall uninstall deinstall
.PHONY: libr binr install-man w32dist tests dist shot pkgcfg depgraph.png