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