]>
Commit | Line | Data |
---|---|---|
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 |
16 | LIB=c |
17 | SHLIB_MAJOR= 1 | |
18 | SHLIB_MINOR= 0 | |
19 | .if (${MACHINE_ARCH} == unknown) | |
9385eb3d | 20 | MACHINE_ARCH != /usr/bin/arch |
5b2abdfb | 21 | .endif |
7c78c529 | 22 | CC = 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) | |
25 | CFLAGS += -D__DARWIN_UNIX03=1 | |
26 | .else | |
27 | CFLAGS += -D__DARWIN_UNIX03=0 | |
5b2abdfb | 28 | .endif |
eb1cde05 A |
29 | .if (${MACHINE_ARCH} == i386) |
30 | CFLAGS += -march=prescott -msse3 | |
31 | .endif | |
3d9156a7 | 32 | CFLAGS += -D__LIBC__ -DNOID -I${.CURDIR}/include |
59e0d9fe | 33 | .ifdef ALTLIBCHEADERS |
3d9156a7 A |
34 | INCLUDEDIR = ${ALTLIBCHEADERS} |
35 | CFLAGS += -I${INCLUDEDIR} | |
59e0d9fe A |
36 | .endif |
37 | .ifdef ALTFRAMEWORKSPATH | |
38 | PRIVINC = -F${ALTFRAMEWORKSPATH} -I${ALTFRAMEWORKSPATH}/System.framework/PrivateHeaders | |
39 | .else | |
40 | PRIVINC = -I${NEXT_ROOT}/System/Library/Frameworks/System.framework/PrivateHeaders | |
41 | .endif | |
42 | CFLAGS += ${PRIVINC} | |
5b2abdfb | 43 | CFLAGS += -DLIBC_MAJOR=${SHLIB_MAJOR} -no-cpp-precomp -force_cpusubtype_ALL |
3d9156a7 A |
44 | CFLAGS += -fno-common -pipe -Wmost -g -D__FBSDID=__RCSID |
45 | CFLAGS += -finline-limit=1500 --param inline-unit-growth=200 -Winline | |
5b2abdfb A |
46 | AINC= -I${.CURDIR}/${MACHINE_ARCH} -no-cpp-precomp -force_cpusubtype_ALL |
47 | AINC+=-arch ${MACHINE_ARCH} -g | |
48 | CLEANFILES+=tags | |
49 | INSTALL_PIC_ARCHIVE= yes | |
50 | PRECIOUSLIB= yes | |
51 | ||
3d9156a7 A |
52 | # workaround for 3649783 |
53 | AINC += -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) | |
58 | OPTIMIZE-acl_entry.c = -O0 | |
59 | # glob-fbsd.c fails with -static -Os (3869444) so turn off optimization | |
60 | OPTIMIZE-glob-fbsd.c = -O0 | |
61 | .endif | |
62 | ||
5b2abdfb A |
63 | # If these aren't set give it expected defaults |
64 | DSTROOT ?= / | |
65 | OBJROOT ?= . | |
66 | SRCROOT ?= ${.CURDIR} | |
59e0d9fe A |
67 | .ifndef SYMROOT |
68 | SYMROOT = ${.CURDIR}/SYMROOT | |
69 | _x_ != test -d ${SYMROOT} || mkdir -p ${SYMROOT} | |
70 | .endif | |
5b2abdfb A |
71 | DESTDIR ?= ${DSTROOT} |
72 | MAKEOBJDIR ?= ${OBJROOT} | |
73 | ||
59e0d9fe | 74 | CFLAGS += -I${SYMROOT} |
5b2abdfb | 75 | .include "${.CURDIR}/Makefile.inc" |
59e0d9fe | 76 | .PATH: ${SYMROOT} |
5b2abdfb | 77 | .include "Makefile.xbs" |
3d9156a7 A |
78 | .if exists(/usr/share/mk/bsd.init.mk) |
79 | .include <bsd.init.mk> | |
80 | .endif | |
5b2abdfb | 81 | .include <bsd.man.mk> |