Debian Codegraph @

BSDmakefile

raw
1 # $MirOS: contrib/hosted/tg/code/kwalletcli/BSDmakefile,v 1.20 2020/11/19 21:37:09 tg Exp $
2 #-
3 # Copyright © 2009, 2010, 2011, 2012, 2016, 2020
4 # mirabilos <[email protected]>
5 #
6 # Provided that these terms and disclaimer and all copyright notices
7 # are retained or reproduced in an accompanying document, permission
8 # is granted to deal in this work without restriction, including un‐
9 # limited rights to use, publicly perform, distribute, sell, modify,
10 # merge, give away, or sublicence.
11 #
12 # This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
13 # the utmost extent permitted by applicable law, neither express nor
14 # implied; without malicious intent or gross negligence. In no event
15 # may a licensor, author or contributor be held liable for indirect,
16 # direct, other damage, loss, or other issues arising in any way out
17 # of dealing in the work, even if advised of the possibility of such
18 # damage or existence of a defect, except proven that it results out
19 # of said person’s immediate fault when using the work as intended.
20 #-
21 # Note: Qt5 builds may require fPIC in CFLAGS, CXXFLAGS, and LDFLAGS
22 # (*not* CPPFLAGS!) to successfully build; PIE does not work.
23
24 PROG= kwalletcli
25 SRCS= charconv.c main.c
26 SCRIPTS= kwalletaskpass kwalletcli_getpin pinentry-kwallet
27 MAN= ${PROG}.1 ${SCRIPTS:=.1}
28 BINDIR?= ${BSD_PREFIX}/bin
29
30 PKG_CONFIG?= pkg-config
31
32 KDE_VER?= 3
33 .if ${KDE_VER} == 3
34 KDE_INCS?= -I/usr/include/qt3 -I/usr/include/kde
35 SRCS+= kwif3.cc
36 LDADD+= -lkwalletclient -lkdecore -lqt-mt
37 .elif ${KDE_VER} == 4
38 KDE_INCS?= -I/usr/include/qt4 -I/usr/include/qt4/QtCore
39 SRCS+= kwif4.cc
40 LDADD+= -lkdeui -lkdecore -lQtCore
41 .elif ${KDE_VER} == 5
42 . ifndef KDE_INCS
43 QT5_INCS!= ${PKG_CONFIG} --cflags Qt5Gui
44 . endif
45 KDE_INCS?= ${QT5_INCS} -I/usr/include/KF5/KI18n \
46 -I/usr/include/KF5/KCoreAddons \
47 -I/usr/include/KF5/KWallet
48 SRCS+= kwif5.cc
49 LDADD+= -lKF5CoreAddons -lKF5Wallet -lKF5I18n -lQt5Core -lQt5Widgets
50 .else
51 . error unknown KDE_VER; valid: 3 4 5
52 .endif
53
54 CPPFLAGS+= ${KDE_INCS} -D_GNU_SOURCE
55
56 afterinstall:
57 .for _i in ${SCRIPTS}
58 ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
59 ${.CURDIR}/${_i} ${DESTDIR}${BINDIR}/
60 .endfor
61
62 .include <bsd.prog.mk>
63
64 # HTML manpage generation code (currently assumes the basenames
65 # of all manpages to be generated are unique, unlike man(1, 7).
66 HTMANMODE?= local # one of local or sectioned
67 .for _p in ${MANALL}
68 HTMANS+= ${_p:R}.htm
69 ${_p:R}.htm: ${_p}
70 @(. ${BSDSRCDIR}/scripts/roff2htm; \
71 do_conversion_verbose ${_p:R} ${_p:E:S/cat//} ${_p} $@)
72 .endfor
73
74 CLEANFILES+= ${HTMANS}
75 htman: .PHONY ${HTMANS}