aboutsummaryrefslogtreecommitdiff
path: root/devel/linux_kdump/files/patch-Makefile
blob: a1f7ded56f692db66e111d78ba6d7c4cdd2755b5 (plain) (blame)
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
--- ./Makefile.orig	2004-02-14 09:05:13.000000000 +0200
+++ ./Makefile	2014-03-28 08:43:01.000000000 +0200
@@ -2,14 +2,19 @@
 
 PROG=	linux_kdump
 SRCS=	kdump.c linux_ioctl.c subr.c syscallnames.c
+.if exists(${SRCDIR}/usr.bin/kdump/kdump_subr.h)
+SRCS+=	kdump_subr.c
+CLEANFILES+=kdump_subr.c
+.endif
 CLEANFILES+=linux_ioctl.c syscallnames.c
 
-BINDIR=	/bin
-DESTDIR=${PREFIX}
-MANDIR=	/man/man
+DESTDIR?=${STAGEDIR}${PREFIX}
+BINDIR=	${PREFIX}/bin
+MANDIR=	${PREFIX}/man/man
 SRCDIR?=/usr/src
+LINUXBASE?=/compat/linux
 
-CFLAGS+=-I${SRCDIR}/usr.bin/ktrace -I${SRCDIR}
+CFLAGS+=-I${SRCDIR}/usr.bin/ktrace -I${SRCDIR}/usr.bin/kdump -I${SRCDIR}
 .PATH:	${SRCDIR}/usr.bin/ktrace
 
 default:	depend all
@@ -23,4 +28,9 @@
 linux_ioctl.c: mkioctls.linux
 	/bin/sh ${.CURDIR}/mkioctls.linux
 
+.if exists(${SRCDIR}/usr.bin/kdump/kdump_subr.h)
+kdump_subr.c: ${SRCDIR}/usr.bin/kdump/mksubr
+	/bin/sh ${SRCDIR}/usr.bin/kdump/mksubr ${LINUXBASE}/usr/include > ${.TARGET}
+.endif
+
 .include <bsd.prog.mk>