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