5 SRCS= main.c setup.c syscalls.c syscalls.h ioctl.c
7 .if exists(${.CURDIR}/${MACHINE_ARCH}-fbsd.c)
8 SRCS+= ${MACHINE_ARCH}-fbsd.c
10 SRCS+= ${MACHINE_CPUARCH}-fbsd.c
13 CFLAGS+= -I${.CURDIR} -I.
14 CLEANFILES= syscalls.master syscalls.h ioctl.c
18 syscalls.master: ${.CURDIR}/../../sys/kern/syscalls.master
19 cat ${.ALLSRC} > syscalls.master
21 syscalls.h: syscalls.master
22 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh syscalls.master \
25 ioctl.c: ${.CURDIR}/../kdump/mkioctls
26 sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
28 .if ${MACHINE_CPUARCH} == "i386"
29 SRCS+= i386-linux.c linux_syscalls.h
30 CLEANFILES+=i386l-syscalls.master linux_syscalls.h
32 i386l-syscalls.master: ${.CURDIR}/../../sys/i386/linux/syscalls.master
33 cat ${.ALLSRC} > ${.TARGET}
35 linux_syscalls.h: i386l-syscalls.master
36 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
37 ${.CURDIR}/i386linux.conf
40 .if ${MACHINE_CPUARCH} == "amd64"
41 SRCS+= amd64-linux32.c linux32_syscalls.h
42 CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h
44 amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master
45 cat ${.ALLSRC} > ${.TARGET}
47 linux32_syscalls.h: amd64l32-syscalls.master
48 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
49 ${.CURDIR}/amd64linux32.conf
51 SRCS+= amd64-fbsd32.c freebsd32_syscalls.h
52 CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
54 fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
55 cat ${.ALLSRC} > ${.TARGET}
57 freebsd32_syscalls.h: fbsd32-syscalls.master
58 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
59 ${.CURDIR}/fbsd32.conf
62 .if ${MACHINE_ARCH} == "powerpc64"
63 SRCS+= powerpc-fbsd.c freebsd32_syscalls.h
64 CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
66 fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
67 cat ${.ALLSRC} > ${.TARGET}
69 freebsd32_syscalls.h: fbsd32-syscalls.master
70 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
71 ${.CURDIR}/fbsd32.conf
74 .include <bsd.prog.mk>