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 12# If you bump SHLIB_MAJOR, remove kluge from gen/gethostname.c. 13SHLIB_MAJOR= 5 14SHLIBDIR?= /lib 15CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include 16CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} 17CLEANFILES+=tags 18INSTALL_PIC_ARCHIVE= yes 19PRECIOUSLIB= yes 20 21# Define (empty) variables so that make doesn't give substitution 22# errors if the included makefiles don't change these: 23MDSRCS= 24MISRCS= 25MDASM= 26MIASM= 27NOASM= 28 29# 30# If there is a machine dependent makefile, use it: 31# 32.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc) 33.include "${.CURDIR}/${MACHINE_ARCH}/Makefile.inc" 34.endif 35 36.include "${.CURDIR}/db/Makefile.inc" 37.include "${.CURDIR}/compat-43/Makefile.inc" 38.include "${.CURDIR}/gdtoa/Makefile.inc" 39.include "${.CURDIR}/gen/Makefile.inc" 40.if ${MACHINE_ARCH} != "powerpc" 41.include "${.CURDIR}/gmon/Makefile.inc" 42.endif 43.include "${.CURDIR}/locale/Makefile.inc" 44.include "${.CURDIR}/net/Makefile.inc" 45.include "${.CURDIR}/nls/Makefile.inc" 46.include "${.CURDIR}/posix1e/Makefile.inc" 47.if !defined(NO_QUAD) 48.include "${.CURDIR}/quad/Makefile.inc" 49.endif 50.include "${.CURDIR}/regex/Makefile.inc" 51.include "${.CURDIR}/stdio/Makefile.inc" 52.include "${.CURDIR}/stdlib/Makefile.inc" 53.include "${.CURDIR}/stdtime/Makefile.inc" 54.include "${.CURDIR}/string/Makefile.inc" 55.include "${.CURDIR}/sys/Makefile.inc" 56.include "${.CURDIR}/rpc/Makefile.inc" 57.include "${.CURDIR}/uuid/Makefile.inc" 58.include "${.CURDIR}/xdr/Makefile.inc" 59.if !defined(NO_YP_LIBC) 60CFLAGS+= -DYP 61.include "${.CURDIR}/yp/Makefile.inc" 62.endif 63.if !defined(NO_HESIOD_LIBC) 64CFLAGS+= -DHESIOD 65.endif 66 67# If there are no machine dependent sources, append all the 68# machine-independent sources: 69.if empty(MDSRCS) 70SRCS+= ${MISRCS} 71.else 72# Append machine-dependent sources, then append machine-independent sources 73# for which there is no machine-dependent variant. 74SRCS+= ${MDSRCS} 75.for _src in ${MISRCS} 76.if ${MDSRCS:R:M${_src:R}} == "" 77SRCS+= ${_src} 78.endif 79.endfor 80.endif 81 82KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 83 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 84 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 85KSRCS= bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \ 86 strlen.c strncpy.c 87 88libkern: libkern.gen libkern.${MACHINE_ARCH} 89 90libkern.gen: ${KQSRCS} ${KSRCS} 91 cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 92 93libkern.${MACHINE_ARCH}:: ${KMSRCS} 94.if defined(KMSRCS) && !empty(KMSRCS) 95 cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} 96.endif 97 98.include <bsd.lib.mk> 99