File: Makefile

package info (click to toggle)
freebsd-utils 10.1~svn273304-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 14,620 kB
  • sloc: ansic: 155,497; yacc: 5,768; sh: 3,098; xml: 1,853; makefile: 1,231; cpp: 1,071; lex: 468; perl: 242
file content (49 lines) | stat: -rw-r--r-- 1,292 bytes parent folder | download
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
#	@(#)Makefile	8.1 (Berkeley) 6/6/93
# $FreeBSD$

.include <bsd.own.mk>

.if (${MACHINE_ARCH} == "amd64")
SFX=		32
.endif

.PATH: ${.CURDIR}/../ktrace

PROG=		kdump
SRCS=		kdump_subr.c kdump.c ioctl.c subr.c
DPSRCS=		kdump_subr.h 
CFLAGS+=	-I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I.

.if ${MK_PF} != "no"
CFLAGS+=-DPF
.endif

CFLAGS+=	-Wno-error=implicit-function-declaration
LDADD+=		-lfreebsd-glue

.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
SRCS+=		linux_syscalls.c
.endif

NO_WERROR?=	YES

CLEANFILES=	ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c

ioctl.c: mkioctls
	env MACHINE=${MACHINE} CPP="${CPP}" \
	    sh ${.CURDIR}/mkioctls print /usr/src/kfreebsd-headers-10.1-0/sys > ${.TARGET}

kdump_subr.h: mksubr
	sh ${.CURDIR}/mksubr /usr/src/kfreebsd-headers-10.1-0/sys | \
	    sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET}

kdump_subr.c: mksubr kdump_subr.h
	sh ${.CURDIR}/mksubr /usr/src/kfreebsd-headers-10.1-0/sys >${.TARGET}

linux_syscalls.c:
	/bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \
	    ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf
	echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \
	    >> linux_syscalls.c

.include <bsd.prog.mk>