1# @(#)Makefile 8.2 (Berkeley) 2/3/94 2# $FreeBSD$ 3 4.include <bsd.own.mk> 5 6# All library objects contain FreeBSD revision strings by default; they may be 7# excluded as a space-saving measure. To produce a library that does 8# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 9# below. Note: there are no IDs for syscall stubs whose sources are generated. 10# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 11# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. 12LIB=c 13# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c. 14# If you bump SHLIB_MAJOR, see standards/55112. 15SHLIB_MAJOR= 6 16SHLIBDIR?= /lib 17WARNS?= 2 18CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include 19CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} 20CLEANFILES+=tags 21INSTALL_PIC_ARCHIVE= 22PRECIOUSLIB= 23 24# Define (empty) variables so that make doesn't give substitution 25# errors if the included makefiles don't change these: 26MDSRCS= 27MISRCS= 28MDASM= 29MIASM= 30NOASM= 31 32.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" 33.include "${.CURDIR}/db/Makefile.inc" 34.include "${.CURDIR}/compat-43/Makefile.inc" 35.include "${.CURDIR}/gdtoa/Makefile.inc" 36.include "${.CURDIR}/gen/Makefile.inc" 37.include "${.CURDIR}/gmon/Makefile.inc" 38.include "${.CURDIR}/locale/Makefile.inc" 39.include "${.CURDIR}/net/Makefile.inc" 40.include "${.CURDIR}/nls/Makefile.inc" 41.include "${.CURDIR}/posix1e/Makefile.inc" 42.if ${MACHINE_ARCH} != "alpha" && \ 43 ${MACHINE_ARCH} != "amd64" && \ 44 ${MACHINE_ARCH} != "ia64" && \ 45 ${MACHINE_ARCH} != "sparc64" 46.include "${.CURDIR}/quad/Makefile.inc" 47.endif 48.include "${.CURDIR}/regex/Makefile.inc" 49.include "${.CURDIR}/stdio/Makefile.inc" 50.include "${.CURDIR}/stdlib/Makefile.inc" 51.include "${.CURDIR}/stdtime/Makefile.inc" 52.include "${.CURDIR}/string/Makefile.inc" 53.include "${.CURDIR}/sys/Makefile.inc" 54.include "${.CURDIR}/rpc/Makefile.inc" 55.include "${.CURDIR}/uuid/Makefile.inc" 56.include "${.CURDIR}/xdr/Makefile.inc" 57.if ${MACHINE_ARCH} == "arm" 58.include "${.CURDIR}/softfloat/Makefile.inc" 59.endif 60.if ${MK_NIS} != "no" 61CFLAGS+= -DYP 62.include "${.CURDIR}/yp/Makefile.inc" 63.endif 64.if ${MK_HESIOD} != "no" 65CFLAGS+= -DHESIOD 66.endif 67.if ${MK_FP_LIBC} == "no" 68CFLAGS+= -DNO_FLOATING_POINT 69.endif 70 71.if defined(SYMVER_ENABLED) 72VERSION_DEF=${.CURDIR}/Versions.def 73SYMBOL_MAPS=${SYM_MAPS} 74CFLAGS+= -DSYMBOL_VERSIONING 75.endif 76 77# If there are no machine dependent sources, append all the 78# machine-independent sources: 79.if empty(MDSRCS) 80SRCS+= ${MISRCS} 81.else 82# Append machine-dependent sources, then append machine-independent sources 83# for which there is no machine-dependent variant. 84SRCS+= ${MDSRCS} 85.for _src in ${MISRCS} 86.if ${MDSRCS:R:M${_src:R}} == "" 87SRCS+= ${_src} 88.endif 89.endfor 90.endif 91 92KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 93 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 94 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 95KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ 96 strcat.c strcmp.c strcpy.c strlen.c strncpy.c 97 98libkern: libkern.gen libkern.${MACHINE_ARCH} 99 100libkern.gen: ${KQSRCS} ${KSRCS} 101 cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 102 103libkern.${MACHINE_ARCH}:: ${KMSRCS} 104.if defined(KMSRCS) && !empty(KMSRCS) 105 cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} 106.endif 107 108.include <bsd.lib.mk> 109 110# Disable warnings in contributed sources. 111CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/} 112