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
|
|
|
|
2018-02-18 01:04:34 +00:00
|
|
|
PREVIOUS_RELEASE=`git log --tags --simplify-by-decoration --pretty='format:%d'|head -n1|cut -d ' ' -f3 |sed -e 's,),,'`
|
2016-01-20 02:44:59 +00:00
|
|
|
|
2018-05-26 16:12:13 +00:00
|
|
|
B=$(DESTDIR)$(BINDIR)
|
|
|
|
L=$(DESTDIR)$(LIBDIR)
|
2017-05-14 22:39:41 +00:00
|
|
|
MESON?=meson
|
2017-07-28 12:02:27 +00:00
|
|
|
PYTHON?=python
|
2022-11-22 11:19:49 +00:00
|
|
|
R2BINS=$(shell cd binr ; echo r*2 r2agent r2pm r2-indent r2r)
|
2018-05-04 22:59:51 +00:00
|
|
|
ifdef SOURCE_DATE_EPOCH
|
|
|
|
BUILDSEC=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+__%H:%M:%S" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+__%H:%M:%S" 2>/dev/null || date -u "+__%H:%M:%S")
|
|
|
|
else
|
2017-02-05 23:08:02 +00:00
|
|
|
BUILDSEC=$(shell date "+__%H:%M:%S")
|
2018-05-04 22:59:51 +00:00
|
|
|
endif
|
2023-09-09 02:15:45 +00:00
|
|
|
DATADIRS=libr/cons/d libr/flag/d libr/bin/d libr/asm/d libr/syscall/d libr/magic/d libr/anal/d libr/util/d libr/arch/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),)
|
2017-01-29 14:25:14 +00:00
|
|
|
# release
|
|
|
|
R2VC=0
|
2015-04-28 21:47:44 +00:00
|
|
|
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
|
|
|
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
|
|
|
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
|
2021-06-20 23:18:57 +00:00
|
|
|
@libr/count.sh reset
|
2020-08-19 08:31:20 +00:00
|
|
|
${MAKE} -C shlr sdbs
|
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
|
|
|
|
2022-05-20 09:09:36 +00:00
|
|
|
GIT_TAP=$(shell git describe --tags --match '[0-9]*' 2>/dev/null)
|
2021-05-30 22:06:58 +00:00
|
|
|
GIT_TIP=$(shell git rev-parse HEAD 2>/dev/null || echo $(R2_VERSION))
|
2020-12-07 16:21:40 +00:00
|
|
|
R2_VER=$(shell ./configure -qV)
|
2022-08-01 13:57:50 +00:00
|
|
|
ifeq ($(GIT_TAP),)
|
|
|
|
GIT_TAP=$(R2_VER)
|
|
|
|
endif
|
|
|
|
ifeq ($(GIT_TIP),)
|
|
|
|
GIT_TIP=$(R2_VER)
|
|
|
|
endif
|
2018-05-04 22:59:51 +00:00
|
|
|
ifdef SOURCE_DATE_EPOCH
|
|
|
|
GIT_NOW=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d")
|
2016-09-28 17:17:43 +00:00
|
|
|
else
|
2018-05-04 22:59:51 +00:00
|
|
|
GIT_NOW=$(shell date "+%Y-%m-%d")
|
2016-09-28 17:17:43 +00:00
|
|
|
endif
|
2015-09-23 20:37:15 +00:00
|
|
|
|
2021-05-30 22:06:58 +00:00
|
|
|
tap tiptap tip:
|
|
|
|
@echo tip $(GIT_TIP)
|
|
|
|
@echo tap $(GIT_TAP)
|
2021-04-15 19:16:33 +00:00
|
|
|
|
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
|
2021-01-19 02:03:36 +00:00
|
|
|
@echo '#ifndef R_VERSION_H' > $@.tmp
|
|
|
|
@echo '#define R_VERSION_H 1' >> $@.tmp
|
|
|
|
@echo '#define R2_VERSION_COMMIT $(R2VC)' >> $@.tmp
|
|
|
|
@echo '#define R2_VERSION "$(R2_VERSION)"' >> $@.tmp
|
|
|
|
@echo '#define R2_VERSION_MAJOR $(R2_VERSION_MAJOR)' >> $@.tmp
|
|
|
|
@echo '#define R2_VERSION_MINOR $(R2_VERSION_MINOR)' >> $@.tmp
|
|
|
|
@echo '#define R2_VERSION_PATCH $(R2_VERSION_PATCH)' >> $@.tmp
|
|
|
|
@echo '#define R2_VERSION_NUMBER $(R2_VERSION_NUMBER)' >> $@.tmp
|
|
|
|
@echo '#define R2_GITTAP $(ESC)"$(GIT_TAP)$(ESC)"' >> $@.tmp
|
|
|
|
@echo '#define R2_GITTIP $(ESC)"$(GIT_TIP)$(ESC)"' >> $@.tmp
|
|
|
|
@echo '#define R2_BIRTH $(ESC)"$(GIT_NOW)$(BUILDSEC)$(ESC)"' >> $@.tmp
|
|
|
|
@echo '#endif' >> $@.tmp
|
2017-02-10 16:43:47 +00:00
|
|
|
@mv -f $@.tmp $@
|
2016-01-03 01:13:53 +00:00
|
|
|
@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
|
2017-05-14 23:41:35 +00:00
|
|
|
$(SHELL) ./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:
|
2016-09-02 15:13:03 +00:00
|
|
|
cd libr ; perl depgraph.pl dot | dot -Tpng -o../depgraph.png
|
2012-09-02 23:27:52 +00:00
|
|
|
|
|
|
|
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
|
2017-05-18 14:50:52 +00:00
|
|
|
ZIPNAME?=radare2-${WINBITS}-${VERSION}.zip
|
2015-03-20 12:07:56 +00:00
|
|
|
|
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"
|
2016-07-03 11:12:30 +00:00
|
|
|
mkdir -p "${WINDIST}/share/radare2/${VERSION}/sysregs"
|
|
|
|
cp -f libr/sysregs/d/*.sdb "${WINDIST}/share/radare2/${VERSION}/sysregs"
|
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"
|
2023-09-09 02:15:45 +00:00
|
|
|
mkdir -p "${WINDIST}/share/radare2/${VERSION}/platform"
|
|
|
|
cp -f libr/arch/d/*.r2 "${WINDIST}/share/radare2/${VERSION}/platform"
|
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"
|
2024-10-21 18:45:30 +00:00
|
|
|
mkdir -p "${WINDIST}/share/radare2/${VERSION}/scripts"
|
|
|
|
cp -f scripts/*.js scripts/*.py "${WINDIST}/share/radare2/${VERSION}/scripts"
|
2018-05-26 16:12:13 +00:00
|
|
|
mkdir -p "${WINDIST}/share/radare2/${VERSION}/flag"
|
|
|
|
cp -f libr/flag/d/*.r2 "${WINDIST}/share/radare2/${VERSION}/flag"
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${WINDIST}/share/doc/radare2"
|
|
|
|
mkdir -p "${WINDIST}/include/libr/sdb"
|
2016-07-10 08:56:55 +00:00
|
|
|
mkdir -p "${WINDIST}/include/libr/r_util"
|
2022-10-16 19:37:52 +00:00
|
|
|
mkdir -p "${WINDIST}/include/libr/r_anal"
|
2015-10-23 00:58:48 +00:00
|
|
|
@echo "${C}[WINDIST] Copying development files${R}"
|
2022-11-19 00:05:18 +00:00
|
|
|
cp -f shlr/sdb/include/*.h "${WINDIST}/include/libr/sdb/"
|
2016-07-09 21:04:38 +00:00
|
|
|
cp -f libr/include/r_util/*.h "${WINDIST}/include/libr/r_util/"
|
2022-10-16 19:37:52 +00:00
|
|
|
cp -f libr/include/r_anal/*.h "${WINDIST}/include/libr/r_anal/"
|
2015-10-26 21:33:45 +00:00
|
|
|
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"
|
2016-06-26 02:44:59 +00:00
|
|
|
@cp -f libr/bin/d/elf32 "${WINDIST}/share/radare2/${VERSION}/format"
|
|
|
|
@cp -f libr/bin/d/elf64 "${WINDIST}/share/radare2/${VERSION}/format"
|
|
|
|
@cp -f libr/bin/d/elf_enums "${WINDIST}/share/radare2/${VERSION}/format"
|
|
|
|
@cp -f libr/bin/d/pe32 "${WINDIST}/share/radare2/${VERSION}/format"
|
|
|
|
@cp -f libr/bin/d/trx "${WINDIST}/share/radare2/${VERSION}/format"
|
2016-01-20 20:15:33 +00:00
|
|
|
@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"
|
2018-05-19 22:29:53 +00:00
|
|
|
@cp -PRpf libr/cons/d/* "${WINDIST}/share/radare2/${VERSION}/cons"
|
2015-10-26 21:33:45 +00:00
|
|
|
@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)
|
2017-05-18 14:50:52 +00:00
|
|
|
$(ZIP) -r "${ZIPNAME}" "radare2-${WINBITS}-${VERSION}"
|
2015-05-25 16:27:59 +00:00
|
|
|
endif
|
2010-01-15 16:02:04 +00:00
|
|
|
|
2021-12-02 16:39:59 +00:00
|
|
|
clean:
|
2018-06-16 15:51:31 +00:00
|
|
|
rm -f libr/libr.a libr/libr.dylib libr/include/r_version.h
|
2018-05-09 21:31:52 +00:00
|
|
|
rm -rf libr/.libr
|
2022-12-10 17:58:33 +00:00
|
|
|
-rm -f `find * | grep arm | grep dis.a$$`
|
2018-05-09 21:31:52 +00:00
|
|
|
for DIR in shlr libr binr ; do $(MAKE) -C "$$DIR" clean ; done
|
2023-08-17 20:12:12 +00:00
|
|
|
rm -f `find . -type f -name '*.d'` || for a in `find . -type f -name '*.d'` ; do rm -f "$$a" ; done
|
|
|
|
rm -f `find . -type f -name '*.o'` || for a in `find . -type f -name '*.o'` ; do rm -f "$$a" ; done
|
2012-09-03 23:46:12 +00:00
|
|
|
rm -f config-user.mk plugins.cfg libr/config.h
|
2018-08-10 14:06:41 +00:00
|
|
|
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
|
|
|
|
2018-08-13 12:17:41 +00:00
|
|
|
distclean mrproper: clean
|
2023-03-22 12:08:29 +00:00
|
|
|
rm -rf libr/arch/p/arm/v35/arch-arm*
|
|
|
|
rm -rf shlr/capstone
|
2018-08-13 12:17:41 +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"
|
2017-10-18 15:53:00 +00:00
|
|
|
for FILE in $(shell cd man && ls *.1) ; do \
|
2015-10-26 21:33:45 +00:00
|
|
|
ln -fs "${PWD}/man/$$FILE" "${DESTDIR}${MANDIR}/man1/$$FILE" ; done
|
|
|
|
cd "${DESTDIR}${MANDIR}/man1" && ln -fs radare2.1 r2.1
|
2023-06-25 17:48:03 +00:00
|
|
|
for FILE in $(shell cd man && ls *.7) ; do \
|
2016-01-20 01:22:00 +00:00
|
|
|
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:
|
2020-08-18 04:11:35 +00:00
|
|
|
mkdir -p "${DESTDIR}${DOCDIR}"
|
2017-03-15 18:00:52 +00:00
|
|
|
${INSTALL_DIR} "${DESTDIR}${DOCDIR}"
|
2017-10-18 15:53:00 +00:00
|
|
|
@echo ${DOCDIR}
|
2017-07-16 08:39:01 +00:00
|
|
|
for FILE in doc/* ; do \
|
2017-10-18 11:14:17 +00:00
|
|
|
if [ -f $$FILE ]; then ${INSTALL_DATA} $$FILE "${DESTDIR}${DOCDIR}" || true ; fi; \
|
2017-07-16 08:39:01 +00:00
|
|
|
done
|
2011-02-17 00:22:15 +00:00
|
|
|
|
|
|
|
install-doc-symlink:
|
2020-08-18 04:11:35 +00:00
|
|
|
mkdir -p "${DESTDIR}${DOCDIR}"
|
2017-03-15 18:00:52 +00:00
|
|
|
${INSTALL_DIR} "${DESTDIR}${DOCDIR}"
|
2017-10-18 15:53:00 +00:00
|
|
|
for FILE in $(shell cd doc ; ls) ; do \
|
|
|
|
ln -fs "$(PWD)/doc/$$FILE" "${DESTDIR}${DOCDIR}" ; done
|
2011-02-17 00:22:15 +00:00
|
|
|
|
2020-12-19 09:29:46 +00:00
|
|
|
install: install-doc install-man install-www install-pkgconfig
|
|
|
|
$(MAKE) -C libr install
|
|
|
|
$(MAKE) -C binr install
|
|
|
|
$(MAKE) -C shlr install
|
2018-05-26 16:12:13 +00:00
|
|
|
for DIR in ${DATADIRS} ; do $(MAKE) -C "$$DIR" install ; done
|
2022-11-19 00:05:18 +00:00
|
|
|
cd "$(DESTDIR)$(LIBDIR)/radare2/" && rm -f last && ln -fs $(VERSION) last
|
|
|
|
cd "$(DESTDIR)$(DATADIR)/radare2/" && rm -f last && ln -fs $(VERSION) last
|
2024-10-21 18:45:30 +00:00
|
|
|
rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/scripts"
|
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/scripts"
|
|
|
|
cp -rf scripts/*.js scripts/*.py "${DESTDIR}${DATADIR}/radare2/${VERSION}/scripts"
|
2016-11-12 10:08:34 +00:00
|
|
|
rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud"
|
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud"
|
2017-02-14 11:46:54 +00:00
|
|
|
mkdir -p "${DESTDIR}${BINDIR}"
|
2017-10-15 22:06:25 +00:00
|
|
|
#${INSTALL_SCRIPT} "${PWD}/sys/indent.sh" "${DESTDIR}${BINDIR}/r2-indent"
|
2016-11-12 10:08:34 +00:00
|
|
|
cp -f doc/hud "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud/main"
|
2015-10-26 21:33:45 +00:00
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
|
2017-10-18 15:53:00 +00:00
|
|
|
$(SHELL) ./configure-plugins --rm-static $(DESTDIR)$(LIBDIR)/radare2/last/
|
2009-02-05 21:28:33 +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}"
|
2017-10-18 15:53:00 +00:00
|
|
|
for FILE in $(shell cd shlr/www ; ls) ; do \
|
|
|
|
ln -fs "$(PWD)/shlr/www/$$FILE" "$(DESTDIR)$(WWWROOT)" ; done
|
2012-09-06 01:12:54 +00:00
|
|
|
|
2020-04-20 10:14:28 +00:00
|
|
|
install-pkgconfig pkgconfig-install:
|
|
|
|
@${INSTALL_DIR} "${DESTDIR}${LIBDIR}/pkgconfig"
|
|
|
|
for FILE in $(shell cd pkgcfg ; ls *.pc) ; do \
|
|
|
|
cp -f "$(PWD)/pkgcfg/$$FILE" "${DESTDIR}${LIBDIR}/pkgconfig/$$FILE" ; done
|
|
|
|
|
|
|
|
install-pkgconfig-symlink pkgconfig-symstall symstall-pkgconfig:
|
2020-08-18 04:11:35 +00:00
|
|
|
mkdir -p "${DESTDIR}${LIBDIR}/pkgconfig"
|
2015-10-26 21:33:45 +00:00
|
|
|
@${INSTALL_DIR} "${DESTDIR}${LIBDIR}/pkgconfig"
|
2017-10-18 15:53:00 +00:00
|
|
|
for FILE in $(shell cd pkgcfg ; ls *.pc) ; do \
|
|
|
|
ln -fs "$(PWD)/pkgcfg/$$FILE" "${DESTDIR}${LIBDIR}/pkgconfig/$$FILE" ; done
|
2014-07-09 23:13:04 +00:00
|
|
|
|
2017-07-26 21:15:41 +00:00
|
|
|
symstall-sdb:
|
2015-10-26 21:33:45 +00:00
|
|
|
for DIR in ${DATADIRS} ; do (\
|
|
|
|
cd "$$DIR" ; \
|
|
|
|
echo "$$DIR" ; \
|
|
|
|
${MAKE} install-symlink ); \
|
2011-11-29 02:14:27 +00:00
|
|
|
done
|
2017-07-26 21:15:41 +00:00
|
|
|
|
|
|
|
symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink symstall-www symstall-sdb
|
|
|
|
cd libr && ${MAKE} install-symlink
|
|
|
|
cd binr && ${MAKE} install-symlink
|
|
|
|
cd shlr && ${MAKE} install-symlink
|
2017-02-14 11:46:54 +00:00
|
|
|
mkdir -p "${DESTDIR}${BINDIR}"
|
|
|
|
ln -fs "${PWD}/sys/indent.sh" "${DESTDIR}${BINDIR}/r2-indent"
|
2024-10-21 18:45:30 +00:00
|
|
|
rm -rf "${DESTDIR}${DATADIR}/radare2/${VERSION}/scripts"
|
|
|
|
ln -fs scripts "${DESTDIR}${DATADIR}/radare2/${VERSION}/scripts"
|
2016-11-12 10:08:34 +00:00
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud"
|
2018-05-26 16:12:13 +00:00
|
|
|
ln -fs "${PWD}/doc/hud" "${DESTDIR}${DATADIR}/radare2/${VERSION}/hud/main"
|
2018-05-30 16:11:14 +00:00
|
|
|
#mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/flag"
|
|
|
|
#ln -fs $(PWD)/libr/flag/d/tags.r2 "${DESTDIR}${DATADIR}/radare2/${VERSION}/flag/tags.r2"
|
2022-11-13 01:07:52 +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
|
|
|
mkdir -p "${DESTDIR}${DATADIR}/radare2/${VERSION}/"
|
2017-05-14 23:41:35 +00:00
|
|
|
$(SHELL) ./configure-plugins --rm-static $(DESTDIR)/$(LIBDIR)/radare2/last/
|
2010-05-24 15:51:51 +00:00
|
|
|
|
2011-03-28 08:24:01 +00:00
|
|
|
deinstall uninstall:
|
2017-02-12 23:56:51 +00:00
|
|
|
rm -f $(DESTDIR)$(BINDIR)/r2-indent
|
2018-05-20 10:03:35 +00:00
|
|
|
cd libr && ${MAKE} uninstall
|
|
|
|
cd binr && ${MAKE} uninstall
|
|
|
|
cd shlr && ${MAKE} uninstall
|
2021-01-21 23:52:12 +00:00
|
|
|
cd libr/util/d && ${MAKE} uninstall
|
2018-05-20 10:03:35 +00:00
|
|
|
cd libr/syscall/d && ${MAKE} uninstall
|
|
|
|
cd libr/anal/d && ${MAKE} uninstall
|
2023-09-09 03:13:56 +00:00
|
|
|
cd libr/arch/d && ${MAKE} uninstall
|
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:
|
2017-03-15 18:00:52 +00:00
|
|
|
rm -rf "${DESTDIR}${DOCDIR}"
|
2015-10-26 21:33:45 +00:00
|
|
|
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
|
|
|
|
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
|
|
|
|
2017-05-29 20:47:51 +00:00
|
|
|
# required for EXT_SO
|
|
|
|
include libr/config.mk
|
|
|
|
|
2014-11-22 01:51:35 +00:00
|
|
|
strip:
|
2018-01-28 02:12:50 +00:00
|
|
|
#-for FILE in ${R2BINS} ; do ${STRIP} -s "${DESTDIR}${BINDIR}/$$FILE" 2> /dev/null ; done
|
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
-${STRIP} -STxX "${DESTDIR}${LIBDIR}/libr_"*".${EXT_SO}"
|
|
|
|
else
|
|
|
|
-${STRIP} -s "${DESTDIR}${LIBDIR}/libr_"*".${EXT_SO}"
|
|
|
|
endif
|
2012-02-17 12:23:58 +00:00
|
|
|
|
2022-06-03 13:09:23 +00:00
|
|
|
purge: purge-doc purge-dev uninstall 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_"*
|
2017-09-19 12:36:48 +00:00
|
|
|
rm -f "${DESTDIR}${LIBDIR}/libr2"*".${EXT_SO}"
|
2015-10-26 21:33:45 +00:00
|
|
|
rm -rf "${DESTDIR}${LIBDIR}/radare2"
|
|
|
|
rm -rf "${DESTDIR}${INCLUDEDIR}/libr"
|
2017-05-31 11:41:42 +00:00
|
|
|
rm -rf "${DESTDIR}${DATADIR}/radare2"
|
2009-03-06 00:38:23 +00:00
|
|
|
|
2018-08-10 14:06:41 +00:00
|
|
|
system-purge: purge
|
|
|
|
sys/purge.sh
|
2018-02-27 23:50:01 +00:00
|
|
|
|
2024-04-25 17:47:14 +00:00
|
|
|
user-purge:
|
|
|
|
rm -rf $(HOME)/.local/share/radare2
|
|
|
|
|
2009-03-05 12:15:28 +00:00
|
|
|
dist:
|
2023-03-15 09:12:27 +00:00
|
|
|
$(MAKE) -C dist/tarball
|
|
|
|
cp -f dist/tarball/*.$(TAREXT) .
|
|
|
|
cp -f dist/tarball/*.zip .
|
2009-04-25 11:29:39 +00:00
|
|
|
|
|
|
|
shot:
|
2023-03-15 09:12:27 +00:00
|
|
|
$(MAKE) -C dist/tarball VERSION=`date '+%Y%m%d'`
|
2009-08-22 01:54:24 +00:00
|
|
|
|
2021-02-03 11:07:14 +00:00
|
|
|
tests test:
|
2022-10-17 18:52:09 +00:00
|
|
|
$(MAKE) -j -C test
|
2012-02-03 15:28:52 +00:00
|
|
|
|
2017-11-15 15:43:31 +00:00
|
|
|
macos-sign:
|
|
|
|
$(MAKE) -C binr/radare2 macos-sign
|
2016-01-22 19:53:01 +00:00
|
|
|
|
2017-11-15 15:43:31 +00:00
|
|
|
macos-sign-libs:
|
|
|
|
$(MAKE) -C binr/radare2 macos-sign-libs
|
2015-09-20 21:16:09 +00:00
|
|
|
|
2016-07-06 22:32:59 +00:00
|
|
|
osx-pkg:
|
|
|
|
sys/osx-pkg.sh $(VERSION)
|
|
|
|
|
2015-04-17 19:12:30 +00:00
|
|
|
quality:
|
|
|
|
./sys/shellcheck.sh
|
|
|
|
|
2022-11-19 00:05:18 +00:00
|
|
|
ctags:
|
|
|
|
@ctags **/*.c **/*.h > /dev/null
|
|
|
|
|
2016-03-25 10:10:16 +00:00
|
|
|
menu nconfig:
|
|
|
|
./sys/menu.sh || true
|
|
|
|
|
2022-02-01 19:03:01 +00:00
|
|
|
include mk/meson.mk
|
2009-08-22 01:54:24 +00:00
|
|
|
include ${MKPLUGINS}
|
2009-03-05 12:15:28 +00:00
|
|
|
|
2018-08-10 14:06:41 +00:00
|
|
|
.PHONY: all clean 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
|
2018-08-10 14:06:41 +00:00
|
|
|
.PHONY: purge system-purge
|
2018-04-11 00:32:27 +00:00
|
|
|
.PHONY: shlr/capstone
|