forked from WithSecureLabs/drozer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (31 loc) · 1.14 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
NATIVES = $(shell find src/mwr/droidhg/modules -name Android.mk)
SOURCES = $(shell find src/mwr/droidhg/modules -name *.java)
DX = dx
JAVAC = javac
NDKBUILD = ndk-build
PYTHON = python
all: dist-egg dist-windows
apks: $(SOURCES:.java=.apk)
clean:
find -name *.pyc |xargs rm -f
rm -f $(SOURCES:.java=.class) $(SOURCES:.java=.apk)
rm -rf build/* dist/*
dist-egg: sources apks native-libraries
$(PYTHON) setup.py bdist_egg
dist-windows: sources apks native-libraries
$(PYTHON) setup.py bdist_wininst
lint: force
cd src && pylint mwr -d C0103,C0301,E1101,R0201,R0902,R0903,R0904,R0911,R0913,W0108,W0141,W0142,W0631 --ignore protobuf_pb2.py,app,auxiliary,exploit,information,scanner,shell,tools |less
native-libraries: $(NATIVES)
sources: src/mwr/cinnibar/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)
src/mwr/cinnibar/api/protobuf_pb2.py: common/protobuf.proto
cd common; protoc --python_out=../src/mwr/cinnibar/api/ protobuf.proto
force: ;