1.include <bsd.init.mk> 2 3LIB= mach 4 5 6A= ${.CURDIR}/${MACHINE_CPUARCH} 7H= ${.CURDIR}/../../include/mach 8DEFS=${.CURDIR}/../../sys/compat/mach/defs 9 10 11.PATH: ${.CURDIR}/mach 12.PATH: ${A} 13.PATH: ${A}/sys 14 15.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../sys ${.CURDIR}/../../.. /sys /usr/src/sys 16.if !defined(SYSDIR) && exists(${_dir}/kern/) 17SYSDIR= ${_dir} 18.endif 19.endfor 20.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) 21.error "can't find kernel source tree" 22.endif 23 24CFLAGS+= -I${.CURDIR}/../../include -I. -I${A} -I${.CURDIR} -I./include 25CFLAGS+= -I${SYSDIR} -I${.CURDIR}/../../apsl/include -I${MACHINE_INCLUDES} 26CFLAGS+= -fPIC -DPRIVATE -D__MigTypeCheck=1 -DLIBSYSCALL_INTERFACE=1 27DEBUG_FLAGS= -g -O0 28mach_port.h mach_portUser.c: ${DEFS}/mach_port.defs 29 mig ${CFLAGS} -server /dev/null ${DEFS}/mach_port.defs 30 cp mach_port.h ${H}/mach_port.h 31task.h taskUser.c: ${DEFS}/task.defs 32 mig ${CFLAGS} -server /dev/null ${DEFS}/task.defs 33 cp task.h ${H}/task.h 34host_priv.h host_privUser.c: ${DEFS}/host_priv.defs 35 mig ${CFLAGS} -server /dev/null ${DEFS}/host_priv.defs 36 cp host_priv.h ${H}/host_priv.h 37mach_host.h mach_hostUser.c: ${DEFS}/mach_host.defs 38 mig ${CFLAGS} -server /dev/null ${DEFS}/mach_host.defs 39 cp mach_host.h ${H}/mach_host.h 40vm_map.h vm_mapUser.c: ${DEFS}/vm_map.defs 41 mig ${CFLAGS} -server /dev/null ${DEFS}/vm_map.defs 42 cp vm_map.h ${H}/vm_map.h 43mach_vm.h mach_vmUser.c: ${DEFS}/mach_vm.defs 44 mig ${CFLAGS} -server /dev/null ${DEFS}/mach_vm.defs 45 cp mach_vm.h ${H}/mach_vm.h 46clock.h clockUser.c: ${DEFS}/clock.defs 47 mig ${CFLAGS} -server /dev/null ${DEFS}/clock.defs 48 cp clock.h ${H}/clock.h 49SRCS= \ 50 clockUser.c \ 51 mach_portUser.c \ 52 taskUser.c \ 53 host_privUser.c \ 54 mach_hostUser.c \ 55 vm_mapUser.c \ 56 mach_vmUser.c \ 57 error_codes.c \ 58 mach_error_string.c \ 59 mach_init.c \ 60 mach_msg.c \ 61 mach_misc.c \ 62 mig_allocate.c \ 63 mig_deallocate.c \ 64 mig_reply_setup.c \ 65 mig_strncpy.c \ 66 mig_support.c 67 68CLEANFILES+= machine *~ mach_port.h task.h host_priv.h mach_host.h 69CLEANFILES+= cscope.* vm_map.h *User.c 70 71.include <bsd.lib.mk> 72