]> git.saurik.com Git - apple/xnu.git/blob - libsyscall/Makefile
xnu-1504.15.3.tar.gz
[apple/xnu.git] / libsyscall / 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 # 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.
9 #
10 # Yes, we build everything with -g, and strip it out later...
11 #
12 LIB=syscall
13 SHLIB_MAJOR= 1
14 SHLIB_MINOR= 0
15 .if (${MACHINE_ARCH} == unknown)
16 .ifdef RC_ARCHS
17 MACHINE_ARCH != echo $(RC_ARCHS) | cut -f 1 -d " "
18 .else
19 MACHINE_ARCH != /usr/bin/arch
20 .endif
21 .endif
22 .if !empty $(MACHINE_ARCH:M*64)
23 LP64 = 1
24 .endif
25 SDKROOT ?= /
26 CC = xcrun -sdk $(SDKROOT) gcc
27 MIG = xcrun -sdk $(SDKROOT) mig
28 MIGCC != xcrun -find -sdk $(SDKROOT) gcc
29 .ifdef ALTFRAMEWORKSPATH
30 PRIVINC = -F${ALTFRAMEWORKSPATH} -I${ALTFRAMEWORKSPATH}/System.framework/PrivateHeaders
31 .else
32 PRIVINC = -I${SDKROOT}/System/Library/Frameworks/System.framework/PrivateHeaders
33 .endif
34 CFLAGS += ${PRIVINC}
35 CFLAGS += -no-cpp-precomp
36 CFLAGS += -fno-common -pipe -Wmost -g
37 CFLAGS += -DCF_EXCLUDE_CSTD_HEADERS -DCF_OPEN_SOURCE
38 CFLAGS += -isysroot ${SDKROOT}
39 AINC= -no-cpp-precomp
40 AINC+= -arch ${MACHINE_ARCH} -g
41 MIGDEFINES ?=
42 CLEANFILES+=tags
43 INSTALL_PIC_ARCHIVE= yes
44 PRECIOUSLIB= yes
45
46 # workaround for 3649783
47 AINC += -fdollars-in-identifiers
48
49 # If these aren't set give it expected defaults
50 DESTDIR ?= ${DSTROOT}
51 MAKEOBJDIR ?= ${OBJROOT}
52
53 # add version string
54 SRCS += libsyscall_version.c
55 libsyscall_version.c:
56 ${SDKROOT}/Developer/Makefiles/bin/version.pl Libsyscall > $@
57
58 CFLAGS += -I${SYMROOT}
59 .include "${.CURDIR}/Makefile.inc"
60 .PATH: ${SYMROOT}
61 .include "Makefile.xbs"
62 .if exists(/usr/share/mk/bsd.init.mk)
63 .include <bsd.init.mk>
64 .endif
65 .include <bsd.man.mk>