forked from WithSecureLabs/drozer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (41 loc) · 1.24 KB
/
Makefile
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
NATIVES = $(shell find src/drozer/modules -name Android.mk)
SOURCES = $(shell find src/drozer/modules -name *.java)
DX = dx
JAVAC = javac
NDKBUILD = ndk-build
PYTHON = python
SDK = $(CURDIR)/src/drozer/lib/android.jar
all: sources apks native-libraries
@echo
@echo "----------------------------------------"
@echo
@echo "drozer"
@echo "You are almost ready to run drozer..."
@echo
@echo "To finish preparing your environment run:"
@echo
@echo " $$ source ENVIRONMENT"
@echo
@echo "Then you should be able to run 'drozer' to see the available commands."
@echo
@echo "----------------------------------------"
@echo
apks: $(SOURCES:.java=.apk)
clean:
find -name *.pyc |xargs rm -f
rm -f $(SOURCES:.java=.class) $(SOURCES:.java=.apk)
native-libraries: $(NATIVES)
sources: src/pydiesel/api/protobuf_pb2.py
test: force
$(PYTHON) test/mwr_test/all.py
%.apk: %.class
cd $(dir $^); $(DX) --dex --output=$(notdir $(^:.class=.apk) $(^:.class=*.class))
%.class: %.java
cd $(dir $^); $(JAVAC) -cp $(SDK) $(notdir $^)
%.mk: force
cd $(dir $@); $(NDKBUILD)
common/protobuf.proto:
git submodule init && git submodule update
src/pydiesel/api/protobuf_pb2.py: common/protobuf.proto
cd common; protoc --python_out=../src/pydiesel/api/ protobuf.proto
force: ;