xref: /dflybsd-src/lib/libc/Makefile (revision f54c5bc1cd9de86a903ca743b7c167b0c5b38128)
1984263bcSMatthew Dillon#	@(#)Makefile	8.2 (Berkeley) 2/3/94
2984263bcSMatthew Dillon# $FreeBSD: src/lib/libc/Makefile,v 1.24 1999/09/29 15:18:29 marcel Exp $
3984263bcSMatthew Dillon#
4984263bcSMatthew DillonLIB=c
52a65303dSPeter AvalosSHLIB_MAJOR= 8
617f97226SFrançois TigeotSHLIBDIR?= /lib
745587072SSascha WildnerCFLAGS+= -I${.CURDIR}/include -I${.OBJDIR} -I${.CURDIR}/${MACHINE_ARCH}
8b98a330eSJohn MarinoCFLAGS+= -DNLS
944d3e190SzrjCFLAGS+= -D__LIBC
10984263bcSMatthew DillonCLEANFILES+=tags
11984263bcSMatthew DillonPRECIOUSLIB=	yes
12b740f289SSimon Schubert
1338653241SSascha WildnerLDFLAGS+= -nodefaultlibs
14984263bcSMatthew Dillon
15984263bcSMatthew Dillon#
163a5be3f2SSascha Wildner# Include make rules that are shared with libc_rtld.
17984263bcSMatthew Dillon#
18984263bcSMatthew Dillon.include "${.CURDIR}/Makefile.inc"
19984263bcSMatthew Dillon
20df5c926fSJohn MarinoVERSION_DEF=	${.CURDIR}/Versions.def
21df5c926fSJohn MarinoSYMBOL_MAPS=	${CMAPS}
22df5c926fSJohn Marino
23*f54c5bc1SSascha WildnerKSRCS=	bcmp.c ffs.c index.c rindex.c strcat.c strcmp.c strcpy.c \
24984263bcSMatthew Dillon	strlen.c strncpy.c
25984263bcSMatthew Dillon
26984263bcSMatthew Dillonlibkern: libkern.gen libkern.${MACHINE_ARCH}
27984263bcSMatthew Dillon
28f32ed374SSascha Wildnerlibkern.gen: ${KSRCS}
29f32ed374SSascha Wildner	cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern
30984263bcSMatthew Dillon
31984263bcSMatthew Dillonlibkern.${MACHINE_ARCH}:: ${KMSRCS}
32984263bcSMatthew Dillon.if defined(KMSRCS) && !empty(KMSRCS)
33984263bcSMatthew Dillon	cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH}
34984263bcSMatthew Dillon.endif
35984263bcSMatthew Dillon
36984263bcSMatthew Dillon.include <bsd.lib.mk>
37b2ea2a51SSascha Wildner
38b2ea2a51SSascha Wildner# Disable warnings in contributed sources.
39450f08dbSSascha WildnerCWARNFLAGS:=	${.IMPSRC:N*dtoa*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/}
40