]> git.saurik.com Git - apple/libc.git/blame_incremental - Makefile
Libc-391.5.18.tar.gz
[apple/libc.git] / Makefile
... / ...
CommitLineData
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 $
3#
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.
9#
10# Yes, we build everything with -g, and strip it out later...
11#
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#
16LIB=c
17SHLIB_MAJOR= 1
18SHLIB_MINOR= 0
19.if (${MACHINE_ARCH} == unknown)
20MACHINE_ARCH != /usr/bin/arch
21.endif
22.if !empty $(MACHINE_ARCH:M*64)
23LP64 = 1
24.endif
25CC = gcc-4.0
26# always set __DARWIN_UNIX03 to zero (variant will set to one) except for ppc64
27.ifdef LP64
28CFLAGS += -D__DARWIN_UNIX03=1
29.else
30CFLAGS += -D__DARWIN_UNIX03=0
31.endif
32CFLAGS += -D__LIBC__ -DNOID -I${.CURDIR}/include
33.ifdef ALTLIBCHEADERS
34INCLUDEDIR = ${ALTLIBCHEADERS}
35CFLAGS += -I${INCLUDEDIR}
36.endif
37.ifdef ALTFRAMEWORKSPATH
38PRIVINC = -F${ALTFRAMEWORKSPATH} -I${ALTFRAMEWORKSPATH}/System.framework/PrivateHeaders
39.else
40PRIVINC = -I${NEXT_ROOT}/System/Library/Frameworks/System.framework/PrivateHeaders
41.endif
42CFLAGS += ${PRIVINC}
43CFLAGS += -DLIBC_MAJOR=${SHLIB_MAJOR} -no-cpp-precomp -force_cpusubtype_ALL
44CFLAGS += -fno-common -pipe -Wmost -g -D__FBSDID=__RCSID
45CFLAGS += -finline-limit=1500 --param inline-unit-growth=200 -Winline
46AINC= -I${.CURDIR}/${MACHINE_ARCH} -no-cpp-precomp -force_cpusubtype_ALL
47AINC+=-arch ${MACHINE_ARCH} -g
48CLEANFILES+=tags
49INSTALL_PIC_ARCHIVE= yes
50PRECIOUSLIB= yes
51
52# workaround for 3649783
53AINC += -fdollars-in-identifiers
54
55# ppc64 optimizer still blows up on some files, so we use -O0 to turn it
56# off on a per file basis
57.if (${MACHINE_ARCH} == ppc64)
58OPTIMIZE-acl_entry.c = -O0
59# glob-fbsd.c fails with -static -Os (3869444) so turn off optimization
60OPTIMIZE-glob-fbsd.c = -O0
61.endif
62
63# If these aren't set give it expected defaults
64DSTROOT ?= /
65OBJROOT ?= .
66SRCROOT ?= ${.CURDIR}
67.ifndef SYMROOT
68SYMROOT = ${.CURDIR}/SYMROOT
69_x_ != test -d ${SYMROOT} || mkdir -p ${SYMROOT}
70.endif
71DESTDIR ?= ${DSTROOT}
72MAKEOBJDIR ?= ${OBJROOT}
73
74CFLAGS += -I${SYMROOT}
75.include "${.CURDIR}/Makefile.inc"
76.PATH: ${SYMROOT}
77.include "Makefile.xbs"
78.if exists(/usr/share/mk/bsd.init.mk)
79.include <bsd.init.mk>
80.endif
81.include <bsd.man.mk>