Commit 4ca9b19d by devttys0

Added --with-ida configure option; added ida Makefile target

parent 2bf2c4a8
......@@ -16,8 +16,11 @@ BUILD_C_LIBS=@BUILD_C_LIBS@
BUILD_BUNDLES=@BUILD_BUNDLES@
PYTHON=@PYTHON@
SRC_C_DIR="./src/C"
SRC_BUNDLES_DIR="./src/bundles"
IDA_DIR?=@IDA_DIR@
SRC_DIR="./src"
SCRIPTS_DIR="$(SRC_DIR)/scripts"
SRC_C_DIR="$(SRC_DIR)/C"
SRC_BUNDLES_DIR="$(SRC_DIR)/bundles"
ifeq ($(strip $(prefix)),)
PREFIX=""
......@@ -32,6 +35,10 @@ all: build
install: build
$(PYTHON) ./setup.py install $(PREFIX)
ida: build
if [ "$(IDA_DIR)" != "" ] && [ -e "$(IDA_DIR)/plugins" ]; then cp $(SCRIPTS_DIR)/binida.py $(IDA_DIR)/plugins/; fi
if [ "$(IDA_DIR)" != "" ] && [ -e "$(IDA_DIR)/python/lib/python2.7" ]; then cp -R $(SRC_DIR)/binwalk $(IDA_DIR)/python/lib/python2.7/; fi
build:
if [ "$(BUILD_C_LIBS)" -eq "1" ]; then make -C $(SRC_C_DIR); fi
if [ "$(BUILD_BUNDLES)" -eq "1" ]; then make -C $(SRC_BUNDLES_DIR); fi
......
......@@ -603,6 +603,7 @@ INSTALL_OPTIONS
PLATFORM
SOEXT
SONAME
IDA_DIR
PYTHON
BUILD_PYQTGRAPH
BUILD_FUZZY
......@@ -661,6 +662,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_ida
with_python
enable_clibs
enable_bundles
......@@ -1295,6 +1297,7 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-ida=$HOME/ida define the IDA install path
--with-python=python explicitly install using the specified python
interpreter (python2, python3, etc)
......@@ -3304,6 +3307,15 @@ fi
# Check whether --with-ida was given.
if test "${with_ida+set}" = set; then :
withval=$with_ida; IDA_DIR=$withval
else
IDA_DIR=$HOME/ida
fi
# Check whether --with-python was given.
if test "${with_python+set}" = set; then :
withval=$with_python; PYTHON=$withval
......@@ -3407,6 +3419,8 @@ BUILD_PYQTGRAPH=$BUILD_PYQTGRAPH
PYTHON=$PYTHON
IDA_DIR=$IDA_DIR
SONAME=$SONAME
SOEXT=$SOEXT
......
......@@ -7,6 +7,11 @@ AC_LANG(C)
AC_TYPE_SIZE_T
AC_FUNC_MALLOC
AC_ARG_WITH([ida],
[AS_HELP_STRING([--with-ida=$HOME/ida], [define the IDA install path])],
[IDA_DIR=$withval],
[IDA_DIR=$HOME/ida])
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=python], [explicitly install using the specified python interpreter (python2, python3, etc)])],
[PYTHON=$withval],
......@@ -86,6 +91,7 @@ AC_SUBST(BUILD_MAGIC, $BUILD_MAGIC)
AC_SUBST(BUILD_FUZZY, $BUILD_FUZZY)
AC_SUBST(BUILD_PYQTGRAPH, $BUILD_PYQTGRAPH)
AC_SUBST(PYTHON, $PYTHON)
AC_SUBST(IDA_DIR, $IDA_DIR)
AC_SUBST(SONAME, $SONAME)
AC_SUBST(SOEXT, $SOEXT)
AC_SUBST(PLATFORM, $(uname -s))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment