Makefile (211725) | Makefile (211774) |
---|---|
1# @(#)Makefile 8.2 (Berkeley) 2/3/94 | 1# @(#)Makefile 8.2 (Berkeley) 2/3/94 |
2# $FreeBSD: head/lib/libc/Makefile 211725 2010-08-23 22:24:11Z imp $ | 2# $FreeBSD: head/lib/libc/Makefile 211774 2010-08-24 20:54:43Z imp $ |
3 4SHLIBDIR?= /lib 5 6.include <bsd.own.mk> 7 | 3 4SHLIBDIR?= /lib 5 6.include <bsd.own.mk> 7 |
8# We have to special case powerpc and powerpc64, since they mostly have 9# the same source implementation. libc is very different due to large 10# ABI differences. 11.if ${LIBC_ARCH} == "powerpc" 12LIBC_ARCH=${MACHINE_ARCH} 13.else 14LIBC_ARCH=${LIBC_ARCH} 15.endif 16 |
|
8# All library objects contain FreeBSD revision strings by default; they may be 9# excluded as a space-saving measure. To produce a library that does 10# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 11# below. Note: there are no IDs for syscall stubs whose sources are generated. 12# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 13# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. 14LIB=c 15SHLIB_MAJOR= 7 16WARNS?= 2 17CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include | 17# All library objects contain FreeBSD revision strings by default; they may be 18# excluded as a space-saving measure. To produce a library that does 19# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS 20# below. Note: there are no IDs for syscall stubs whose sources are generated. 21# To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS 22# to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. 23LIB=c 24SHLIB_MAJOR= 7 25WARNS?= 2 26CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include |
18CFLAGS+=-I${.CURDIR}/${MACHINE_CPUARCH} | 27CFLAGS+=-I${.CURDIR}/${LIBC_ARCH} |
19CFLAGS+=-DNLS 20CLEANFILES+=tags 21INSTALL_PIC_ARCHIVE= 22PRECIOUSLIB= 23 24# 25# Only link with static libgcc.a (no libgcc_eh.a). 26# --- 4 unchanged lines hidden (view full) --- 31# Define (empty) variables so that make doesn't give substitution 32# errors if the included makefiles don't change these: 33MDSRCS= 34MISRCS= 35MDASM= 36MIASM= 37NOASM= 38 | 28CFLAGS+=-DNLS 29CLEANFILES+=tags 30INSTALL_PIC_ARCHIVE= 31PRECIOUSLIB= 32 33# 34# Only link with static libgcc.a (no libgcc_eh.a). 35# --- 4 unchanged lines hidden (view full) --- 40# Define (empty) variables so that make doesn't give substitution 41# errors if the included makefiles don't change these: 42MDSRCS= 43MISRCS= 44MDASM= 45MIASM= 46NOASM= 47 |
39.include "${.CURDIR}/${MACHINE_CPUARCH}/Makefile.inc" | 48.include "${.CURDIR}/${LIBC_ARCH}/Makefile.inc" |
40.include "${.CURDIR}/db/Makefile.inc" 41.include "${.CURDIR}/compat-43/Makefile.inc" 42.include "${.CURDIR}/gdtoa/Makefile.inc" 43.include "${.CURDIR}/gen/Makefile.inc" 44.include "${.CURDIR}/gmon/Makefile.inc" 45.include "${.CURDIR}/inet/Makefile.inc" 46.include "${.CURDIR}/isc/Makefile.inc" 47.include "${.CURDIR}/locale/Makefile.inc" 48.include "${.CURDIR}/nameser/Makefile.inc" 49.include "${.CURDIR}/net/Makefile.inc" 50.include "${.CURDIR}/nls/Makefile.inc" 51.include "${.CURDIR}/posix1e/Makefile.inc" | 49.include "${.CURDIR}/db/Makefile.inc" 50.include "${.CURDIR}/compat-43/Makefile.inc" 51.include "${.CURDIR}/gdtoa/Makefile.inc" 52.include "${.CURDIR}/gen/Makefile.inc" 53.include "${.CURDIR}/gmon/Makefile.inc" 54.include "${.CURDIR}/inet/Makefile.inc" 55.include "${.CURDIR}/isc/Makefile.inc" 56.include "${.CURDIR}/locale/Makefile.inc" 57.include "${.CURDIR}/nameser/Makefile.inc" 58.include "${.CURDIR}/net/Makefile.inc" 59.include "${.CURDIR}/nls/Makefile.inc" 60.include "${.CURDIR}/posix1e/Makefile.inc" |
52.if ${MACHINE_CPUARCH} != "amd64" && \ 53 ${MACHINE_CPUARCH} != "ia64" && \ 54 ${MACHINE_ARCH} != "powerpc64" && \ 55 ${MACHINE_CPUARCH} != "sparc64" && \ 56 ${MACHINE_CPUARCH} != "mips" | 61.if ${LIBC_ARCH} != "amd64" && \ 62 ${LIBC_ARCH} != "ia64" && \ 63 ${LIBC_ARCH} != "powerpc64" && \ 64 ${LIBC_ARCH} != "sparc64" && \ 65 ${LIBC_ARCH} != "mips" |
57.include "${.CURDIR}/quad/Makefile.inc" 58.endif | 66.include "${.CURDIR}/quad/Makefile.inc" 67.endif |
59.if ${MACHINE_ARCH} == "mips" && \ | 68.if ${LIBC_ARCH} == "mips" && \ |
60 (!defined(TARGET_ABI) || ${TARGET_ABI} == "o32") 61.include "${.CURDIR}/quad/Makefile.inc" 62.endif 63.include "${.CURDIR}/regex/Makefile.inc" 64.include "${.CURDIR}/resolv/Makefile.inc" 65.include "${.CURDIR}/stdio/Makefile.inc" 66.include "${.CURDIR}/stdlib/Makefile.inc" 67.include "${.CURDIR}/stdtime/Makefile.inc" 68.include "${.CURDIR}/string/Makefile.inc" 69.include "${.CURDIR}/sys/Makefile.inc" 70.include "${.CURDIR}/rpc/Makefile.inc" 71.include "${.CURDIR}/uuid/Makefile.inc" 72.include "${.CURDIR}/xdr/Makefile.inc" | 69 (!defined(TARGET_ABI) || ${TARGET_ABI} == "o32") 70.include "${.CURDIR}/quad/Makefile.inc" 71.endif 72.include "${.CURDIR}/regex/Makefile.inc" 73.include "${.CURDIR}/resolv/Makefile.inc" 74.include "${.CURDIR}/stdio/Makefile.inc" 75.include "${.CURDIR}/stdlib/Makefile.inc" 76.include "${.CURDIR}/stdtime/Makefile.inc" 77.include "${.CURDIR}/string/Makefile.inc" 78.include "${.CURDIR}/sys/Makefile.inc" 79.include "${.CURDIR}/rpc/Makefile.inc" 80.include "${.CURDIR}/uuid/Makefile.inc" 81.include "${.CURDIR}/xdr/Makefile.inc" |
73.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" | 82.if ${LIBC_ARCH} == "arm" || ${LIBC_ARCH} == "mips" |
74.include "${.CURDIR}/softfloat/Makefile.inc" 75.endif 76.if ${MK_NIS} != "no" 77CFLAGS+= -DYP 78.include "${.CURDIR}/yp/Makefile.inc" 79.endif 80.if ${MK_HESIOD} != "no" 81CFLAGS+= -DHESIOD --- 28 unchanged lines hidden (view full) --- 110.endif 111 112KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 113 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 114 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 115KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ 116 strcat.c strcmp.c strcpy.c strlen.c strncpy.c 117 | 83.include "${.CURDIR}/softfloat/Makefile.inc" 84.endif 85.if ${MK_NIS} != "no" 86CFLAGS+= -DYP 87.include "${.CURDIR}/yp/Makefile.inc" 88.endif 89.if ${MK_HESIOD} != "no" 90CFLAGS+= -DHESIOD --- 28 unchanged lines hidden (view full) --- 119.endif 120 121KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ 122 lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ 123 subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c 124KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c index.c mcount.c rindex.c \ 125 strcat.c strcmp.c strcpy.c strlen.c strncpy.c 126 |
118libkern: libkern.gen libkern.${MACHINE_CPUARCH} | 127libkern: libkern.gen libkern.${LIBC_ARCH} |
119 120libkern.gen: ${KQSRCS} ${KSRCS} 121 cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 122 | 128 129libkern.gen: ${KQSRCS} ${KSRCS} 130 cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern 131 |
123libkern.${MACHINE_CPUARCH}:: ${KMSRCS} | 132libkern.${LIBC_ARCH}:: ${KMSRCS} |
124.if defined(KMSRCS) && !empty(KMSRCS) | 133.if defined(KMSRCS) && !empty(KMSRCS) |
125 cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_CPUARCH} | 134 cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} |
126.endif 127 128.include <bsd.lib.mk> 129 130# Disable warnings in contributed sources. 131CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/} 132# XXX For now, we don't allow libc to be compiled with 133# -fstack-protector-all because it breaks rtld. We may want to make a librtld 134# in the future to circumvent this. 135SSP_CFLAGS:= ${SSP_CFLAGS:S/^-fstack-protector-all$/-fstack-protector/} 136# Disable stack protection for SSP symbols. 137SSP_CFLAGS:= ${.IMPSRC:N*/stack_protector.c:C/^.+$/${SSP_CFLAGS}/} | 135.endif 136 137.include <bsd.lib.mk> 138 139# Disable warnings in contributed sources. 140CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/} 141# XXX For now, we don't allow libc to be compiled with 142# -fstack-protector-all because it breaks rtld. We may want to make a librtld 143# in the future to circumvent this. 144SSP_CFLAGS:= ${SSP_CFLAGS:S/^-fstack-protector-all$/-fstack-protector/} 145# Disable stack protection for SSP symbols. 146SSP_CFLAGS:= ${.IMPSRC:N*/stack_protector.c:C/^.+$/${SSP_CFLAGS}/} |