1# 2# Makefile for the kernel's subroutine library. -wfj 3# 4# $Id: Makefile.inc,v 1.1 94/10/19 18:33:10 bill Exp $ 5 6.PATH: $S/kern/subr 7KERN_SRCS+= \ 8 disklabel.c disksort.c esym.c nullop.c printf.c ring.c rlist.c uio.c 9 10KERN_SRCS+= strcat.c strcpy.c strncpy.c strcmp.c # strlen.c 11# XXX should be conditional. 12MACH_SRCS_S+= \ 13 memmove_${MACHINE}.s scanc_${MACHINE}.s skpc_${MACHINE}.s locc_${MACHINE}.s 14 15# check for possible inline, C, or assembler machine-dependant versions first. 16 17.if exists(addupc_${MACHINE}.c) 18MACH_SRCS+= addupc_${MACHINE}.c 19.elif exists(addupc_${MACHINE}.s) 20MACH_SRCS_S+= addupc_${MACHINE}.s 21.else 22KERN_SRCS+= addupc.c 23.endif 24 25# .if exists(../../include/${MACHINE}/inline/kernel/copyinstr.h) 26# do nothing 27# .elif exists(copyinstr_${MACHINE}.c) 28# MACH_SRCS+= copyinstr_${MACHINE}.c 29# .elif exists(copyinstr_${MACHINE}.s) 30# MACH_SRCS_S+= copyinstr_${MACHINE}.s 31# .else 32# KERN_SRCS+= copyinstr.c 33# .endif 34# copyoutstr.c copystr.c ffs.c strcat.c strcpy.c strlen.c strncpy.c 35 36 37ERROR= ENXIO.o ENODEV.o EOPNOTSUPP.o ENOSYS.o ENOTTY.o 38 39OBJS+= ${ERROR} 40 41${ERROR}: $S/include/sys/errno.h 42 @echo creating ${.PREFIX}.o 43 @printf '#include "sys/errno.h"\n_${.PREFIX}_(){ return(${.PREFIX});}\n' \ 44 > ${.PREFIX}.c 45 @$(CC) -c ${.PREFIX}.c 46 @rm ${.PREFIX}.c 47 48# symbols 49SYMBOLS += subr.symbols 50 51MAN9+= esym.0 rlist.0 # uio.0 printf.0 ringb.0 52