This repository has been archived by the owner on Jul 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
makefile
103 lines (80 loc) · 2.87 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
# Installation script for ansifilter.
# See INSTALL for details.
# Installation directories:
# Destination directory for installation (intended for packagers)
DESTDIR =
# Root directory for final installation
PREFIX = /usr
# Location of the binary:
bin_dir = ${PREFIX}/bin/
# Location of the man page:
man_dir = ${PREFIX}/share/man/man1/
# Location of the documentation:
doc_dir = ${PREFIX}/share/doc/ansifilter/
# Location of additional gui files
desktop_apps = ${PREFIX}/share/applications/
desktop_pixmaps = ${PREFIX}/share/pixmaps/
# Commands:
QMAKE=qmake
INSTALL_DATA=install -m644
INSTALL_PROGRAM=install -m755
MKDIR=mkdir -p -m 755
RMDIR=rm -r -f
all:
${MAKE} -C ./src -f ./makefile
all-gui gui:
${QMAKE} -makefile -o src/qt-gui/Makefile src/qt-gui/ansifilter-gui.pro
${MAKE} -C ./src/qt-gui -f ./Makefile
all-tcl tcl:
${MAKE} -C ./src/tcl -f ./makefile
install:
@echo "This script will install ansifilter in the following directories:"
@echo "Documentation directory: ${DESTDIR}${doc_dir}"
@echo "Manual directory: ${DESTDIR}${man_dir}"
@echo "Binary directory: ${DESTDIR}${bin_dir}"
@echo
${MKDIR} ${DESTDIR}${doc_dir}
${MKDIR} ${DESTDIR}${man_dir}
${MKDIR} ${DESTDIR}${bin_dir}
${INSTALL_DATA} ./man/ansifilter.1.gz ${DESTDIR}${man_dir}
${INSTALL_DATA} ./README ${DESTDIR}${doc_dir}
${INSTALL_DATA} ./ChangeLog ${DESTDIR}${doc_dir}
${INSTALL_DATA} ./COPYING ${DESTDIR}${doc_dir}
${INSTALL_DATA} ./INSTALL ${DESTDIR}${doc_dir}
${INSTALL_PROGRAM} ./src/ansifilter ${DESTDIR}${bin_dir}
@echo
@echo "Done."
@echo "Type ansifilter --help or man ansifilter for instructions."
@echo "Do not hesitate to report problems. Unknown bugs are hard to fix."
install-gui:
${INSTALL_PROGRAM} ./src/qt-gui/ansifilter-gui ${DESTDIR}${bin_dir}
${MKDIR} ${DESTDIR}${desktop_apps} \
${DESTDIR}${desktop_pixmaps}
${INSTALL_DATA} ./ansifilter.desktop ${DESTDIR}${desktop_apps}
${INSTALL_DATA} ./src/qt-gui/ansifilter.xpm ${DESTDIR}${desktop_pixmaps}
uninstall:
@echo "Removing ansifilter files from system..."
${RMDIR} ${DESTDIR}${doc_dir}
rm -f ${DESTDIR}${man_dir}ansifilter.1.gz
rm -f ${DESTDIR}${bin_dir}ansifilter
rm -f ${DESTDIR}${bin_dir}ansifilter-gui
@echo "Done. Have a nice day!"
clean:
$(MAKE) -C ./src -f ./makefile clean
$(MAKE) -C ./src/tcl -f ./makefile clean
apidocs:
doxygen Doxyfile
help:
@echo "This makefile offers the following options:"
@echo
@echo "(all) Compile."
@echo "all-gui Compile Qt GUI (requires Qt 4.x)"
@echo "install* Copy all data files to ${data_dir}."
@echo "clean Remove object files and binary."
@echo "uninstall* Remove ansifilter files from system."
@echo
@echo "* Command needs root privileges."
@echo "See src/makefile for compilation and linking options."
# Target needed for redhat 9.0 rpmbuild
install-strip:
.PHONY: clean all install apidocs help uninstall install-strip