forked from ReFirmLabs/binwalk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
63 lines (50 loc) · 1.77 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
export CC=@CC@
export CFLAGS=@CFLAGS@
export CPPFLAGS=@CPPFLAGS@
export SONAME=@SONAME@
export SOEXT=@SOEXT@
export prefix=@prefix@
export exec_prefix=@exec_prefix@
export LIBDIR=@libdir@
export INSTALL_OPTIONS=@INSTALL_OPTIONS@
export PLATFORM=@PLATFORM@
export BUILD_MAGIC=@BUILD_MAGIC@
export BUILD_FUZZY=@BUILD_FUZZY@
export BUILD_PYQTGRAPH=@BUILD_PYQTGRAPH@
export PYLIBDIR="./binwalk/libs"
BUILD_C_LIBS=@BUILD_C_LIBS@
BUILD_BUNDLES=@BUILD_BUNDLES@
PYTHON=@PYTHON@
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=""
else
PREFIX="--prefix=$(DESTDIR)$(prefix)"
endif
.PHONY: all install build deps clean uninstall
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)" = "yes" ]; then make -C $(SRC_C_DIR); fi
if [ "$(BUILD_BUNDLES)" = "yes" ]; then make -C $(SRC_BUNDLES_DIR); fi
$(PYTHON) ./setup.py build
deps:
./deps.sh
clean:
if [ "$(BUILD_C_LIBS)" = "yes" ]; then make -C $(SRC_C_DIR) clean; fi
if [ "$(BUILD_BUNDLES)" = "yes" ]; then make -C $(SRC_BUNDLES_DIR) clean; fi
$(PYTHON) ./setup.py clean
distclean: clean
if [ "$(BUILD_C_LIBS)" = "yes" ]; then make -C $(SRC_C_DIR) distclean; fi
if [ "$(BUILD_BUNDLES)" = "yes" ]; then make -C $(SRC_BUNDLES_DIR) distclean; fi
rm -rf Makefile config.* *.cache
uninstall:
$(PYTHON) ./setup.py uninstall --pydir=`find $(prefix)/lib -name binwalk | head -1` --pybin=`find $(prefix)/bin -name binwalk | head -1`