-
Notifications
You must be signed in to change notification settings - Fork 618
/
Makefile
79 lines (68 loc) · 2.98 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
# All the actual Makefiles are deeper in the directory tree.
# I am just calling them, here.
PREFIX=/usr
DESTDIR=
UNAME_S := $(shell uname -s)
all:
$(MAKE) -C cppForSwig
clean :
$(MAKE) -C cppForSwig clean
rm -f osxbuild/build-app.log.txt
rm -f osxbuild/armory_*.tar.gz
ifeq ($(UNAME_S),Darwin)
$(MAKE) -C osxbuild/objc_armory distclean
endif
rm -rf osxbuild/workspace/
rm -f CppBlockUtils.py
rm -f qrc_img_resources.py
rm -f _CppBlockUtils.so
rm -f cppForSwig/cryptopp/a.out
rm -f *.pyc BitTornado/*.pyc bitcoinrpc_jsonrpc/*.pyc ui/*.pyc
rm -f armoryengine/*.pyc dialogs/*.pyc BitTornado/BT1/*.pyc
rm -f pytest/*.pyc txjsonrpc/*.pyc jsonrpc/*.pyc txjsonrpc/web/*.pyc
install : all
mkdir -p $(DESTDIR)$(PREFIX)/share/armory/img
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/extras
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/bitcoinrpc_jsonrpc
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/txjsonrpc
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/txjsonrpc/web
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/ui
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/pytest
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/BitTornado/BT1
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/urllib3
mkdir -p $(DESTDIR)$(PREFIX)/lib/armory/urllib3
mkdir -p $(DESTDIR)$(PREFIX)/bin
sed "s: /usr: $(PREFIX):g" < dpkgfiles/armory > $(DESTDIR)$(PREFIX)/bin/armory
chmod +x $(DESTDIR)$(PREFIX)/bin/armory
cp *.py *.so README.md $(DESTDIR)$(PREFIX)/lib/armory/
rsync -rupE armoryengine $(DESTDIR)$(PREFIX)/lib/armory/
rsync -rupE --exclude="img/.DS_Store" img $(DESTDIR)$(PREFIX)/share/armory/
cp extras/*.py $(DESTDIR)$(PREFIX)/lib/armory/extras
cp bitcoinrpc_jsonrpc/*.py $(DESTDIR)$(PREFIX)/lib/armory/bitcoinrpc_jsonrpc
cp -r txjsonrpc/*.py $(DESTDIR)$(PREFIX)/lib/armory/txjsonrpc
cp -r txjsonrpc/web/*.py $(DESTDIR)$(PREFIX)/lib/armory/txjsonrpc/web
cp ui/*.py $(DESTDIR)$(PREFIX)/lib/armory/ui
cp pytest/*.py $(DESTDIR)$(PREFIX)/lib/armory/pytest
cp -r urllib3/* $(DESTDIR)$(PREFIX)/lib/armory/urllib3
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
cp BitTornado/*.py $(DESTDIR)$(PREFIX)/lib/armory/BitTornado
cp BitTornado/BT1/*.py $(DESTDIR)$(PREFIX)/lib/armory/BitTornado/BT1
cp default_bootstrap.torrent $(DESTDIR)$(PREFIX)/lib/armory
sed "s:python /usr:python $(PREFIX):g" < dpkgfiles/armory.desktop > $(DESTDIR)$(PREFIX)/share/applications/armory.desktop
sed "s:python /usr:python $(PREFIX):g" < dpkgfiles/armoryoffline.desktop > $(DESTDIR)$(PREFIX)/share/applications/armoryoffline.desktop
sed "s:python /usr:python $(PREFIX):g" < dpkgfiles/armorytestnet.desktop > $(DESTDIR)$(PREFIX)/share/applications/armorytestnet.desktop
#$(MAKE) -C po install DESTDIR=$(DESTDIR) PREFIX=$(PREFIX)
all-test-tools: all
$(MAKE) -C cppForSwig/gtest
gtest: all-test-tools
(cd cppForSwig/gtest && ./CppBlockUtilsTests)
pytest: all
python -m unittest discover
test: gtest pytest
mo: messages
$(MAKE) -C po mo
messages:
xgettext -o po/messages.pot --from-code=UTF-8 -L Python -ktr *.py armoryengine/*.py ui/*.py
osx :
chmod +x osxbuild/deploy.sh
cd osxbuild; ./deploy.sh