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