summaryrefslogtreecommitdiff
path: root/external/mit/xorg/tools/makekeys/Makefile
blob: a7f086ce731be27b8b3cf2d3a79f40ee63c4265e (plain)
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
#	$NetBSD: Makefile,v 1.4 2015/06/26 02:43:26 matt Exp $

NOMAN=	1

.include <bsd.own.mk>

.PATH:	${X11SRCDIR.X11}/src/util

PROG?=		makekeys
SRCS=		makekeys.c
.if !make(obj) && !exists(${DESTDIR}${X11INCDIR}/X.h)
CLEANFILES+=	X11
CPPFLAGS+=	-I.
XPINCS=		X.h Xarch.h Xos.h Xosdefs.h keysymdef.h
X11INCS=	Xlib.h Xresource.h
CLEANFILES+=	${XPINCS} ${X11INCS} Xfuncproto.h
.if !make(clean) && !make(cleandir)
.BEGIN:
	@rm -f ${.OBJDIR}/X11 && ln -s . X11
.for i in ${XPINCS}
	@rm -f $i && ln -s ${X11SRCDIR.xproto}/$i .
.endfor
.for i in ${X11INCS}
	@rm -f $i && ln -s ${X11SRCDIR.X11}/include/X11/$i .
.endfor
.endif

Xfuncproto.h: ${X11SRCDIR.xproto}/Xfuncproto.h.in
	${TOOL_SED} -e 's/#undef NARROWPROTO/#define NARROWPROTO/'  \
	    -e 's/#undef FUNCPROTO/#define FUNCPROTO 15/' \
	    < ${.ALLSRC} > ${.TARGET}

makekeys.lo makekeys.o makekeys.d: Xfuncproto.h

.else
CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}
.endif

.include <bsd.x11.mk>
.include <bsd.prog.mk>