]> git.saurik.com Git - apple/libc.git/blob - Makefile
Libc-498.1.1.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 # Yes, we build everything with -g, and strip it out later...
5 #
6 # -faltivec now disables inlining, so we can't use it globally. Fortunately,
7 # only two files need altivec support, so we use file-specific CFLAGS to add
8 # the option when needed.
9 #
10 LIB=c
11 SHLIB_MAJOR= 1
12 SHLIB_MINOR= 0
13 .if (${MACHINE_ARCH} == unknown)
14 MACHINE_ARCH != /usr/bin/arch
15 .endif
16 .if !empty $(MACHINE_ARCH:M*64)
17 LP64 = 1
18 .endif
19 CC = gcc-4.0
20 CFLAGS += -D__LIBC__ -D__DARWIN_UNIX03=1 -D__DARWIN_64_BIT_INO_T=1 -D__DARWIN_NON_CANCELABLE=1 -D__DARWIN_VERS_1050=1
21 CFLAGS += -DNOID -I${.CURDIR}/include -std=gnu99
22 .ifdef ALTLIBCHEADERS
23 INCLUDEDIR = ${ALTLIBCHEADERS}
24 LIBCFLAGS += -I${INCLUDEDIR}
25 .endif
26 LIBCFLAGS += -I$(SRCROOT)/include -include _.libc_internal.h
27 FRAMEWORKS = ${OBJROOT}/Frameworks
28 PRIVATEHEADERS = ${FRAMEWORKS}/System.framework/PrivateHeaders
29 PRIVINC = -F${FRAMEWORKS} -I${PRIVATEHEADERS}
30 CFLAGS += ${PRIVINC} -I${.OBJDIR}
31 CFLAGS += -DLIBC_MAJOR=${SHLIB_MAJOR} -no-cpp-precomp -force_cpusubtype_ALL
32 CFLAGS += -fno-common -pipe -Wmost -g -D__FBSDID=__RCSID
33 AINC= -I${.CURDIR}/${MACHINE_ARCH} -no-cpp-precomp -force_cpusubtype_ALL
34 AINC+=-arch ${MACHINE_ARCH} -g
35 CLEANFILES+=tags
36 INSTALL_PIC_ARCHIVE= yes
37 PRECIOUSLIB= yes
38
39 # workaround for 3649783
40 AINC += -fdollars-in-identifiers
41
42 # workaround for 4268581
43 .if make(lib${LIB}_static.a)
44 OPTIMIZE-glob-fbsd.c += -O0
45 .endif
46
47 # If these aren't set give it expected defaults
48 DSTROOT ?= /
49 OBJROOT ?= .
50 SRCROOT ?= ${.CURDIR}
51 .ifndef SYMROOT
52 SYMROOT = ${.CURDIR}/SYMROOT
53 _x_ != test -d ${SYMROOT} || mkdir -p ${SYMROOT}
54 .endif
55 DESTDIR ?= ${DSTROOT}
56 MAKEOBJDIR ?= ${OBJROOT}
57
58 # add version string
59 SRCS += libc_version.c
60 libc_version.c:
61 /Developer/Makefiles/bin/version.pl Libc > $@
62
63 .include "${.CURDIR}/Makefile.inc"
64 .include "Makefile.xbs"
65 .if exists(/usr/share/mk/bsd.init.mk)
66 .include <bsd.init.mk>
67 .endif
68 .include <bsd.man.mk>