forked from goatpig/BitcoinArmory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
86 lines (70 loc) · 2.3 KB
/
Makefile.am
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
# Makefile for BitcoinArmory bitcoin wallet
SUBDIRS = cppForSwig
EXTRA_DIST = *.py *.md LICENSE LICENSE-ATI LICENSE-MIT \
nginx_example.conf imgList.xml autogen.sh \
armoryengine/*.py ui/*.py \
img/* lang/* dpkgfiles/* \
windowsbuild/* linuxbuild/* osxbuild/*
ACLOCAL_AMFLAGS = -I m4
lrelease:
if HAVE_GUI
lrelease lang/*.ts
endif
qrc_img_resources.py: imgList.xml
if HAVE_GUI
pyrcc4 -o qrc_img_resources.py imgList.xml
endif
copy-script:
cp cppForSwig/ArmoryDB ./ArmoryDB
# SWIG code and requirements.
if HAVE_GUI
cp cppForSwig/CppBlockUtils.py ./CppBlockUtils.py
if BUILD_DARWIN
cp cppForSwig/.libs/libCppBlockUtils.dylib ./_CppBlockUtils.so
else
cp cppForSwig/.libs/libCppBlockUtils.so ./_CppBlockUtils.so
endif
endif
.PHONY: copy-script lrelease qrc_img_resources.py
all-local: copy-script lrelease qrc_img_resources.py
#target to clean up pre autotools installation left overs
uninstall-old:
rm -f $(DESTDIR)$(prefix)/bin/ArmoryDB
install-exec-hook: uninstall-old
if HAVE_GUI
mkdir -p $(DESTDIR)$(prefix)/lib/armory/ui
mkdir -p $(DESTDIR)$(prefix)/lib/armory/armoryengine
mkdir -p $(DESTDIR)$(prefix)/lib/armory/lang
mkdir -p $(DESTDIR)$(prefix)/share/applications
cp *.py *.so README.md $(DESTDIR)$(prefix)/lib/armory
cp -r ui/* $(DESTDIR)$(prefix)/lib/armory/ui
cp -r armoryengine/* $(DESTDIR)$(prefix)/lib/armory/armoryengine
cp lang/*.qm $(DESTDIR)$(prefix)/lib/armory/lang
endif
mkdir -p $(DESTDIR)$(prefix)/bin
# Sometimes, uninstall-old deletes a valid ArmoryDB. Copy again to be safe.
cp ArmoryDB $(DESTDIR)$(prefix)/bin
# No need to install test binaries.
if BUILD_TESTS
rm -f $(DESTDIR)$(prefix)/bin/ContainerTests
rm -f $(DESTDIR)$(prefix)/bin/CppBlockUtilsTests
rm -f $(DESTDIR)$(prefix)/bin/DB1kIterTest
endif
# Skip Linux-specific steps on OSX.
if ! BUILD_DARWIN
if HAVE_GUI
rsync -rupE --exclude="img/.DS_Store" img $(DESTDIR)$(prefix)/share/armory/
sed "s: /usr: $(prefix):g" < dpkgfiles/armory > $(DESTDIR)$(prefix)/bin/armory
chmod +x $(DESTDIR)$(prefix)/bin/armory
endif
endif
uninstall-hook: uninstall-old
rm -rf $(DESTDIR)$(prefix)/lib/armory
rm -rf $(DESTDIR)$(prefix)/bin/armory
rm -f $(DESTDIR)$(prefix)/share/applications/armory*
rm -rf $(DESTDIR)$(prefix)/share/armory
clean-local:
rm -f ArmoryDB
rm -f CppBlockUtils.py
rm -f _CppBlockUtils.so
rm -f CppBlockUtils.pyc