-
Notifications
You must be signed in to change notification settings - Fork 64
/
Makefile
112 lines (77 loc) · 2.32 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
# make lint : runs pylint on all all sripts (default)
#
# make pep8 : run pycodestyle on all script files
#
# make secplus : download the secplus library
#
# make ndeflib ; install ndeflib (NDEF messages) library
#
# make gen-files : (re)generate ir/subghz/nfc data file.
#
# make clone-repos : doanload other repos with useful flipper data files
#
PYCODESTYLE=pycodestyle
PEP8ARG=--ignore=E501,E221,E241,E502,W503
PYLINT=pylint
FILES=subghz_secplusv1.py subghz_secplusv2.py \
nfc_prox2flip.py \
nfc_dict_strip.py nfc_dict_diff.py \
subghz_ook_to_sub.py subghz_x10.py subghz_insteon.py \
ir_gen_all_codes.py ir_plot.py \
nfc_gen_url.py nfc_hexdump.py nfc_prox2flip.py \
subghz_create_dat.py subghz_decode_presets.py subghz_gen_cmd.py \
subghz_histogram.py
all: pylint
gen-files: x10-brute ir-brute fan-brute nfc-Rick_Roll
clone-repos: t119bruteforcer flipperzero-bruteforce CAMEbruteforcer Flipper-IRDB secplus
lint: pylint
pylint:
for targ in ${FILES} ; do \
echo $$targ ; \
pylint -E $$targ ; \
done
# pylint --load-plugins perflint $$targ ; \
# python -m py_compile $$targ ; \
#
pep8: pycodestyle
pycodestyle:
for targ in ${FILES} ; do \
echo $$targ ; \
${PYCODESTYLE} ${PEP8ARG} $$targ ; \
done
# generage brute force files
ir-brute:
mkdir -p IR/All-Codes
bash IR/.gen-all-ir.sh
x10-brute:
mkdir -p subghz/X10
( cd subghz/X10 ; ../../subghz_x10.py -b )
fan-brute:
mkdir -p subghz/fan
( cd subghz/fan_bruteforce ; ../../subghz_create_dat.py fan )
nfc-Rick_Roll:
mkdir -p nfc
./nfc_gen_url.py https://youtu.be/dQw4w9WgXcQ "Rick Roll" > nfc/Rick_Roll.nfc
# used 3rd party libraries
ndeflib:
python3 -m pip install ndeflib
secplus:
git clone https://github.com/argilo/secplus.git
####
clean:
@/bin/rm -f *sub *.ir *.nfc touch_tunes-?? *_ON.sub *_OFF.sub X10_All-*.sub secv2-*.sub
@/bin/rm -rf __pycache__ repos
# clone usful repos with flipper datafiles
t119bruteforcer: repos
mkdir -p repos
( cd repos ; git clone https://github.com/xb8/t119bruteforcer.git )
flipperzero-bruteforce:
mkdir -p repos
( cd repos ; git clone https://github.com/tobiabocchi/flipperzero-bruteforce.git )
CAMEbruteforcer:
mkdir -p repos
( cd repos ; git clone https://github.com/BitcoinRaven/CAMEbruteforcer.git )
Flipper-IRDB:
mkdir -p repos
( cd repos ; git clone https://github.com/logickworkshop/Flipper-IRDB.git )