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
27 sh ${.CURDIR}/../kdump/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
29 .if ${MACHINE_CPUARCH} == "i386"
30 SRCS+= i386-linux.c linux_syscalls.h
31 CLEANFILES+=i386l-syscalls.master linux_syscalls.h
33 i386l-syscalls.master: ${.CURDIR}/../../sys/i386/linux/syscalls.master
34 cat ${.ALLSRC} > ${.TARGET}
36 linux_syscalls.h: i386l-syscalls.master
37 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
38 ${.CURDIR}/i386linux.conf
41 .if ${MACHINE_CPUARCH} == "amd64"
42 SRCS+= amd64-linux32.c linux32_syscalls.h
43 CLEANFILES+=amd64l32-syscalls.master linux32_syscalls.h
45 amd64l32-syscalls.master: ${.CURDIR}/../../sys/amd64/linux32/syscalls.master
46 cat ${.ALLSRC} > ${.TARGET}
48 linux32_syscalls.h: amd64l32-syscalls.master
49 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
50 ${.CURDIR}/amd64linux32.conf
52 SRCS+= amd64-fbsd32.c freebsd32_syscalls.h
53 CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
55 fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
56 cat ${.ALLSRC} > ${.TARGET}
58 freebsd32_syscalls.h: fbsd32-syscalls.master
59 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
60 ${.CURDIR}/fbsd32.conf
63 .if ${MACHINE_ARCH} == "powerpc64"
64 SRCS+= powerpc-fbsd.c freebsd32_syscalls.h
65 CLEANFILES+=fbsd32-syscalls.master freebsd32_syscalls.h
67 fbsd32-syscalls.master: ${.CURDIR}/../../sys/compat/freebsd32/syscalls.master
68 cat ${.ALLSRC} > ${.TARGET}
70 freebsd32_syscalls.h: fbsd32-syscalls.master
71 /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh ${.ALLSRC} \
72 ${.CURDIR}/fbsd32.conf
75 .include <bsd.prog.mk>