1#	$NetBSD: Makefile,v 1.3 2011/04/03 13:29:45 mbalmer Exp $
2
3.include <bsd.own.mk>
4
5PROG=		ssh-askpass
6SRCS=		drawing.c dynlist.c resources.c x11-ssh-askpass.c
7
8APPDEFS=	SshAskpass.ad
9DATE=		February 14, 2001
10
11BUILDSYMLINKS=	SshAskpass-default.ad SshAskpass.ad
12
13FILESDIR=	${X11ROOTDIR}/share/examples/ssh-askpass
14FILES=		SshAskpass-1337.ad SshAskpass-NeXTish.ad \
15		SshAskpass.ad SshAskpass-green.ad SshAskpass-motif.ad
16
17# XXX:	We use the following two lines instead of just having
18# XXX:		FILES+= SshAskpass-default.ad
19# XXX:	because of an obscure bug with "make -j" where it doesn't find
20# XXX:	SshAskpass-default.ad in the .PATH correctly, probably because
21# XXX:	of the rule created for it from BUILDSYMLINKS by <bsd.files.mk>.
22# XXX:	This is not the correct long-term solution.
23#
24FILES+=			SshAskpass.ad
25FILESNAME_SshAskpass.ad=SshAskpass-default.ad
26
27
28CPPFLAGS+=	-I.
29DPSRCS+=	SshAskpass_ad.h
30CLEANFILES+=	SshAskpass_ad.h
31
32SRCPATH=        ${X11SRCDIR.local}/programs/x11-ssh-askpass
33
34ssh-askpass.1:  x11-ssh-askpass.man.in
35	sed -e 's#@NAME@#$(PROG)#g' -e 's#@VERSION@#$(VERSION)#g' \
36	    -e 's#@DATE@#$(DATE)#g' < ${SRCPATH}/x11-ssh-askpass.man.in > $@
37
38SshAskpass_ad.h: SshAskpass.ad
39	${_MKTARGET_CREATE}
40	rm -f ${.TARGET}
41	${TOOL_SED} -n '/^[^!]/s/.*/"&",/p' <${.ALLSRC} > ${.TARGET}
42
43LDADD+=		-lXt -lSM -lICE -lXinerama -lXext -lX11
44DPADD+=		${LIBXT} ${LIBSM} ${LIBICE} ${LIBXINERAMA} ${LIBXEXT} ${LIBX11}
45
46.PATH:		${X11SRCDIR.local}/programs/x11-ssh-askpass
47
48.include <bsd.x11.mk>
49.include <bsd.prog.mk>
50