]> git.saurik.com Git - apple/libc.git/blame - Makefile
Libc-391.2.6.tar.gz
[apple/libc.git] / Makefile
CommitLineData
5b2abdfb
A
1# @(#)Makefile 8.2 (Berkeley) 2/3/94
2# $FreeBSD: src/lib/libc/Makefile,v 1.31 2001/08/13 21:48:43 peter Exp $
e9ce8d39 3#
5b2abdfb
A
4# All library objects contain rcsid strings by default; they may be
5# excluded as a space-saving measure. To produce a library that does
6# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
7# from CFLAGS below. To remove these strings from just the system call
8# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
e9ce8d39 9#
5b2abdfb 10# Yes, we build everything with -g, and strip it out later...
e9ce8d39 11#
3d9156a7
A
12# -faltivec now disables inlining, so we can't use it globally. Fortunately,
13# only two files need altivec support, so we use file-specific CFLAGS to add
14# the option when needed.
15#
5b2abdfb
A
16LIB=c
17SHLIB_MAJOR= 1
18SHLIB_MINOR= 0
19.if (${MACHINE_ARCH} == unknown)
9385eb3d 20MACHINE_ARCH != /usr/bin/arch
5b2abdfb 21.endif
7c78c529 22CC = gcc-4.0
3d9156a7
A
23# always set __DARWIN_UNIX03 to zero (variant will set to one) except for ppc64
24.if (${MACHINE_ARCH} == ppc64)
25CFLAGS += -D__DARWIN_UNIX03=1
26.else
27CFLAGS += -D__DARWIN_UNIX03=0
5b2abdfb 28.endif
3d9156a7 29CFLAGS += -D__LIBC__ -DNOID -I${.CURDIR}/include
59e0d9fe 30.ifdef ALTLIBCHEADERS
3d9156a7
A
31INCLUDEDIR = ${ALTLIBCHEADERS}
32CFLAGS += -I${INCLUDEDIR}
59e0d9fe
A
33.endif
34.ifdef ALTFRAMEWORKSPATH
35PRIVINC = -F${ALTFRAMEWORKSPATH} -I${ALTFRAMEWORKSPATH}/System.framework/PrivateHeaders
36.else
37PRIVINC = -I${NEXT_ROOT}/System/Library/Frameworks/System.framework/PrivateHeaders
38.endif
39CFLAGS += ${PRIVINC}
5b2abdfb 40CFLAGS += -DLIBC_MAJOR=${SHLIB_MAJOR} -no-cpp-precomp -force_cpusubtype_ALL
3d9156a7
A
41CFLAGS += -fno-common -pipe -Wmost -g -D__FBSDID=__RCSID
42CFLAGS += -finline-limit=1500 --param inline-unit-growth=200 -Winline
5b2abdfb
A
43AINC= -I${.CURDIR}/${MACHINE_ARCH} -no-cpp-precomp -force_cpusubtype_ALL
44AINC+=-arch ${MACHINE_ARCH} -g
45CLEANFILES+=tags
46INSTALL_PIC_ARCHIVE= yes
47PRECIOUSLIB= yes
48
3d9156a7
A
49# workaround for 3649783
50AINC += -fdollars-in-identifiers
51
52# ppc64 optimizer still blows up on some files, so we use -O0 to turn it
53# off on a per file basis
54.if (${MACHINE_ARCH} == ppc64)
55OPTIMIZE-acl_entry.c = -O0
56# glob-fbsd.c fails with -static -Os (3869444) so turn off optimization
57OPTIMIZE-glob-fbsd.c = -O0
58.endif
59
5b2abdfb
A
60# If these aren't set give it expected defaults
61DSTROOT ?= /
62OBJROOT ?= .
63SRCROOT ?= ${.CURDIR}
59e0d9fe
A
64.ifndef SYMROOT
65SYMROOT = ${.CURDIR}/SYMROOT
66_x_ != test -d ${SYMROOT} || mkdir -p ${SYMROOT}
67.endif
5b2abdfb
A
68DESTDIR ?= ${DSTROOT}
69MAKEOBJDIR ?= ${OBJROOT}
70
59e0d9fe 71CFLAGS += -I${SYMROOT}
5b2abdfb 72.include "${.CURDIR}/Makefile.inc"
59e0d9fe 73.PATH: ${SYMROOT}
5b2abdfb 74.include "Makefile.xbs"
3d9156a7
A
75.if exists(/usr/share/mk/bsd.init.mk)
76.include <bsd.init.mk>
77.endif
5b2abdfb 78.include <bsd.man.mk>