-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
101 lines (85 loc) · 3.86 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
##############################################################################
# file: Makefile #
# #
# ABOS Loader #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/> #
# #
# Written by Alfredo Orozco <[email protected]> #
##############################################################################
install: abosl abosl.pyc abosloader.pyc
mkdir -p /opt/abosloader
cp abosl /opt/abosloader
cp abosl.pyc /opt/abosloader
cp abosloader.pyc /opt/abosloader
ln -sf /opt/abosloader/abosl /usr/local/bin/abosl
install-osx: abosl abosl.pyc abosloader.pyc
mkdir -p ~/Library/abos
cp abosl ~/Library/abos
cp abosl.pyc ~/Library/abos
cp abosloader.pyc ~/Library/abos
ln -sf ~/Library/abos/abosl /usr/local/bin/abosl
uninstall:
rm -Rf /opt/abosloader
clean:
rm -rf __pycache__/
rm -Rf abosl abosl.pyc abosloader.pyc
python2-osx: clean abosl.py abosloader.py
python2 -m compileall abosloader.py abosl.py
rm -rf __pycache__/
echo 'python2 ~/Library/abos/abosl.pyc "$$@"' > abosl
chmod +x abosl
pip2 install intelhex pyserial
python3-osx: clean abosl.py abosloader.py
python3 -m compileall abosloader.py abosl.py
mv __pycache__/abosl.cpython* ./abosl.pyc
mv __pycache__/abosloader.cpython* ./abosloader.pyc
rm -rf __pycache__/
echo 'python3 ~/Library/abos/abosl.pyc "$$@"' > abosl
chmod +x abosl
pip3 install intelhex pyserial
python-osx: clean abosl.py abosloader.py
python -m compileall abosloader.py abosl.py
mv __pycache__/abosl.cpython* ./abosl.pyc
mv __pycache__/abosloader.cpython* ./abosloader.pyc
rm -rf __pycache__/
echo 'python ~/Library/abos/abosl.pyc "$$@"' > abosl
chmod +x abosl
python -m pip install intelhex pyserial
python2: clean abosl.py abosloader.py
python2 -m compileall abosloader.py abosl.py
rm -rf __pycache__/
echo 'python2 /opt/abosloader/abosl.pyc "$$@"' > abosl
chmod +x abosl
pip2 install intelhex pyserial
python3: clean abosl.py abosloader.py
python3 -m compileall abosloader.py abosl.py
mv __pycache__/abosl.cpython* ./abosl.pyc
mv __pycache__/abosloader.cpython* ./abosloader.pyc
rm -rf __pycache__/
echo 'python3 /opt/abosloader/abosl.pyc "$$@"' > abosl
chmod +x abosl
pip3 install intelhex pyserial
python: clean abosl.py abosloader.py
python -m compileall abosloader.py abosl.py
mv __pycache__/abosl.cpython* ./abosl.pyc
mv __pycache__/abosloader.cpython* ./abosloader.pyc
rm -rf __pycache__/
echo 'python /opt/abosloader/abosl.pyc "$$@"' > abosl
chmod +x abosl
python -m pip install intelhex pyserial
windows: abosl.py abosloader.py
del abosl abosl.pyc abosloader.pyc
python -m pip install pyinstaller intelhex pyserial
pyinstaller -y -F -i abos_icon.ico -n abosloader abosl.py