-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
86 lines (74 loc) · 2.13 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
#
# Simple top-level make file for Koko
#
# check installation prefix
ifndef PREFIX
PREFIX = /usr/local
endif
ifndef DATAPREFIX
DATAPREFIX = ${HOME}
endif
export PREFIX
# check variables for sub-makes
ifdef NATIVE
export NATIVE
endif
ifdef DEBUG
export DEBUG
endif
ifdef OS
export OS
endif
.PHONY: all clean install
# build all the components
all:
make -C ./Src
make -C ./QtGui -f MakeGui koko-gui
@echo
@echo "*****************************************************************************"
@echo
@echo "It's all done !"
@echo
@echo "Optional next step:"
@echo " make strip ( remove debugging information from koko-cli )"
@echo
@echo "Now install the programs with (requires superuser privileges):"
@echo " make install ( full installation )"
@echo " make install-exec ( install executables only )"
@echo " make install-conf ( install system-wide configuration file )"
@echo " make install-data ( install program data )"
@echo
@echo " make clean ( remove intermediate files )"
@echo
@echo "See INSTALL.md for details and for installation instructions as a user"
@echo "without superuser privileges."
@echo
@echo "******************************************************************************"
@echo
# install executables and system-wide config file
install: install-exec install-conf
# install executable files only
install-exec:
@echo "Installing executable files ..."
@echo "==============================="
make -C ./Src install
make -C ./QtGui -f MakeGui install
cp koko.desktop /usr/share/applications/koko.desktop
cp ./QtGui/images/koko.png /usr/share/icons/hicolor/512x512/apps/koko.png
update-desktop-database
# install system-wide configuration file
install-conf:
@echo "Installing system-wide configuration file"
@echo "========================================="
install --backup=numbered -m 644 ./kokorc /etc
# install data
install-data:
mkdir -p $(DATAPREFIX)/KODS
cd ./Libs && cp -R * $(DATAPREFIX)/KODS
# clean up
clean:
make -C ./Src clean
make -C ./QtGui -f MakeGui clean
# remove debugging symbols from koko-cli
strip:
make -C ./Src strip