File: Makefile.in

package info (click to toggle)
libt3key 0.2.10-1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 580 kB
  • sloc: ansic: 2,543; sh: 948; xml: 172; makefile: 70
file content (99 lines) | stat: -rw-r--r-- 3,343 bytes parent folder | download | duplicates (2)
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
# Copyright (C) 2011-2012,2018 G.P. Halkes
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# 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/>.
.POSIX:

# Installation prefix (also defined in mk/libt3key)
prefix=/usr/local

# Install program to use (should be BSD install compatible)
INSTALL=install

# The libtool executable
LIBTOOL=libtool

# Miscelaneous install paths. Note that datadir and LOCALEDIR are also defined
# in mk/libt3key
bindir=$(prefix)/bin
libdir=$(prefix)/lib
datadir=$(prefix)/share
docdir=$(prefix)/share/doc/libt3key
mandir=$(prefix)/share/man
includedir=$(prefix)/include
pkgconfigdir=$(libdir)/pkgconfig
LOCALEDIR=$(prefix)/share/locale

all: lib t3keyc t3learnkeys

lib:
	@$(MAKE) -f mk/libt3key

t3keyc: lib
	@$(MAKE) -f mk/t3keyc

t3learnkeys: lib
	@$(MAKE) -f mk/t3learnkeys

.PHONY: all clean dist-clean distclean install install-moddev lib t3keyc t3learnkeys uninstall
.IGNORE: uninstall

clean:
	@$(MAKE) -f mk/libt3key clean
	@$(MAKE) -f mk/t3keyc clean
	@$(MAKE) -f mk/t3learnkeys clean

dist-clean:
	@$(MAKE) -f mk/libt3key dist-clean
	@$(MAKE) -f mk/t3keyc dist-clean
	@$(MAKE) -f mk/t3learnkeys dist-clean
	rm -rf Makefile mk/libt3key mk/t3keyc mk/t3learnkeys config.log libt3key.pc .Makefile* .config*

distclean: dist-clean

# Macros to make DESTDIR support more readable
_bindir=$(DESTDIR)$(bindir)
_libdir=$(DESTDIR)$(libdir)
_datadir=$(DESTDIR)$(datadir)
_docdir=$(DESTDIR)$(docdir)
_mandir=$(DESTDIR)$(mandir)
_includedir=$(DESTDIR)$(includedir)
_pkgconfigdir=$(DESTDIR)$(pkgconfigdir)
_LOCALEDIR=$(DESTDIR)$(LOCALEDIR)

install: all
	$(INSTALL) -d $(_libdir)
	$(LIBTOOL) --mode=install $(INSTALL) -s -m0644 src/libt3key.la $(_libdir)
	chmod 0644 $(_libdir)/libt3key.la
	$(INSTALL) -d $(_includedir)/t3/key/t3key
	$(INSTALL) -m0644 src/key.h src/key_api.h src/key_errors.h $(_includedir)/t3/key/t3key
	$(INSTALL) -d $(_docdir)
	$(INSTALL) -m0644 COPYING README Changelog doc/format.txt doc/format.html doc/supplemental.kmap $(_docdir)
	$(INSTALL) -d $(_pkgconfigdir)
	$(INSTALL) -m0644 libt3key.pc $(_pkgconfigdir)
	$(INSTALL) -d $(_bindir)
	$(INSTALL) -s src.util/t3keyc/t3keyc $(_bindir)
	$(INSTALL) -d $(_datadir)/libt3key1
	find src/database -type f | while read FILE ; do install -m0644 "$$FILE" $(_datadir)/libt3key1 ; \
		$(_bindir)/t3keyc -l  $(_datadir)/libt3key1/"$${FILE##*/}" ; done
	$(INSTALL) -d $(_mandir)/man1
	$(INSTALL) -m0644 man/t3keyc.1 $(_mandir)/man1
	if [ -f src.util/t3learnkeys/t3learnkeys ] ; then $(INSTALL) -s src.util/t3learnkeys/t3learnkeys $(_bindir) ; \
		$(INSTALL) -m0644 man/t3learnkeys.1 $(_mandir)/man1 ; fi

uninstall:
	$(LIBTOOL) --mode=uninstall rm $(_libdir)/libt3key.la
	rm -rf $(_docdir) $(_datadir)
	rm -f $(_bindir)/t3keyc $(_bindir)/t3learnkeys $(_pkgconfigdir)/libt3key.pc
	rm -rf $(_includedir)/t3/key
	rm -f $(_mandir)/man1/t3keyc.1 $(_mandir)/man1/t3learnkeys.1

# LIBVERSION=1