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 $
4 # Yes, we build everything with -g, and strip it out later...
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.
13 .if (${MACHINE_ARCH} == unknown)
14 MACHINE_ARCH != /usr/bin/arch
16 .if !empty $(MACHINE_ARCH:M*64)
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
23 INCLUDEDIR = ${ALTLIBCHEADERS}
24 LIBCFLAGS += -I${INCLUDEDIR}
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
36 INSTALL_PIC_ARCHIVE= yes
39 # workaround for 3649783
40 AINC += -fdollars-in-identifiers
42 # workaround for 4268581
43 .if make(lib${LIB}_static.a)
44 OPTIMIZE-glob-fbsd.c += -O0
47 # If these aren't set give it expected defaults
52 SYMROOT = ${.CURDIR}/SYMROOT
53 _x_ != test -d ${SYMROOT} || mkdir -p ${SYMROOT}
56 MAKEOBJDIR ?= ${OBJROOT}
59 SRCS += libc_version.c
61 /Developer/Makefiles/bin/version.pl Libc > $@
63 .include "${.CURDIR}/Makefile.inc"
64 .include "Makefile.xbs"
65 .if exists(/usr/share/mk/bsd.init.mk)
66 .include <bsd.init.mk>