]>
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 | 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 |
10 | LIB=c |
11 | SHLIB_MAJOR= 1 | |
12 | SHLIB_MINOR= 0 | |
13 | .if (${MACHINE_ARCH} == unknown) | |
9385eb3d | 14 | MACHINE_ARCH != /usr/bin/arch |
5b2abdfb | 15 | .endif |
8e029c65 A |
16 | .if !empty $(MACHINE_ARCH:M*64) |
17 | LP64 = 1 | |
18 | .endif | |
7c78c529 | 19 | CC = gcc-4.0 |
224c7076 A |
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 | |
59e0d9fe | 22 | .ifdef ALTLIBCHEADERS |
3d9156a7 | 23 | INCLUDEDIR = ${ALTLIBCHEADERS} |
224c7076 | 24 | LIBCFLAGS += -I${INCLUDEDIR} |
59e0d9fe | 25 | .endif |
224c7076 A |
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} | |
5b2abdfb | 31 | CFLAGS += -DLIBC_MAJOR=${SHLIB_MAJOR} -no-cpp-precomp -force_cpusubtype_ALL |
3d9156a7 | 32 | CFLAGS += -fno-common -pipe -Wmost -g -D__FBSDID=__RCSID |
5b2abdfb A |
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 | ||
3d9156a7 A |
39 | # workaround for 3649783 |
40 | AINC += -fdollars-in-identifiers | |
41 | ||
224c7076 A |
42 | # workaround for 4268581 |
43 | .if make(lib${LIB}_static.a) | |
44 | OPTIMIZE-glob-fbsd.c += -O0 | |
3d9156a7 A |
45 | .endif |
46 | ||
5b2abdfb A |
47 | # If these aren't set give it expected defaults |
48 | DSTROOT ?= / | |
49 | OBJROOT ?= . | |
50 | SRCROOT ?= ${.CURDIR} | |
59e0d9fe A |
51 | .ifndef SYMROOT |
52 | SYMROOT = ${.CURDIR}/SYMROOT | |
53 | _x_ != test -d ${SYMROOT} || mkdir -p ${SYMROOT} | |
54 | .endif | |
5b2abdfb A |
55 | DESTDIR ?= ${DSTROOT} |
56 | MAKEOBJDIR ?= ${OBJROOT} | |
57 | ||
224c7076 A |
58 | # add version string |
59 | SRCS += libc_version.c | |
60 | libc_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> |