xref: /titanic_44/usr/src/Makefile.ast (revision a3fb080f8ee7268e007cd68c6df8b992a7bd0691)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
217c2fbfb3SApril Chin
22da2e3ebdSchin#
23*3e14f97fSRoger A. Faulkner# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24da2e3ebdSchin#
25da2e3ebdSchin
26da2e3ebdSchin# Override this top level flag so the compiler builds in its native
27da2e3ebdSchin# C99 mode.  This has been enabled to support the math stuff in the
28da2e3ebdSchin# AST tools (including ksh93).
29da2e3ebdSchinC99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
30da2e3ebdSchin
31da2e3ebdSchin# silence common AST&co. warnings...
32da2e3ebdSchin# ... about |#pragma prototyped| ...
33da2e3ebdSchinCERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
34da2e3ebdSchin
357c2fbfb3SApril Chin# common CPP flags for libshell consumers (ksh, shcomp etc.)
36da2e3ebdSchinLIBSHELLCPPFLAGS = \
377c2fbfb3SApril Chin	-I$(LIBSHELLBASE)/$(LIBSHELLMACH)/src/cmd/ksh93 \
387c2fbfb3SApril Chin	-I$(LIBSHELLBASE)/common/include \
39da2e3ebdSchin	-I$(ROOT)/usr/include/ast \
4034f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
41da2e3ebdSchin	-DKSHELL \
4234f9b3eeSRoland Mainz	-DSHOPT_BGX \
43da2e3ebdSchin	-DSHOPT_BRACEPAT \
44da2e3ebdSchin	-DSHOPT_CMDLIB_BLTIN=0 \
45da2e3ebdSchin	'-DSH_CMDLIB_DIR="/usr/ast/bin"' \
46da2e3ebdSchin	'-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"' \
47da2e3ebdSchin	-DSHOPT_DYNAMIC \
48da2e3ebdSchin	-DSHOPT_ESH \
49da2e3ebdSchin	-DSHOPT_FILESCAN \
50da2e3ebdSchin	-DSHOPT_HISTEXPAND \
51da2e3ebdSchin	-DSHOPT_KIA \
52da2e3ebdSchin	-DSHOPT_MULTIBYTE \
53da2e3ebdSchin	-DSHOPT_NAMESPACE \
54da2e3ebdSchin	-DSHOPT_OPTIMIZE \
55da2e3ebdSchin	-DSHOPT_PFSH \
56da2e3ebdSchin	-DSHOPT_RAWONLY \
577c2fbfb3SApril Chin	-DSHOPT_STATS \
58da2e3ebdSchin	-DSHOPT_SUID_EXEC \
59da2e3ebdSchin	-DSHOPT_SYSRC \
607c2fbfb3SApril Chin	-DSHOPT_TYPEDEF \
61da2e3ebdSchin	-DSHOPT_VSH \
62da2e3ebdSchin	-D_BLD_shell \
63da2e3ebdSchin	-D_PACKAGE_ast \
647c2fbfb3SApril Chin	'-DERROR_CATALOG="libshell"' \
65da2e3ebdSchin	-DERROR_CONTEXT_T=Error_context_t \
66da2e3ebdSchin	'-DUSAGE_LICENSE=\
67da2e3ebdSchin		"[-author?David Korn <dgk@research.att.com>]"\
68*3e14f97fSRoger A. Faulkner		"[-copyright?Copyright (c) 1982-2010 AT&T Intellectual Property]"\
69da2e3ebdSchin		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
70da2e3ebdSchin		"[--catalog?libshell]"'
71da2e3ebdSchin
727c2fbfb3SApril Chin# Default CFLAGS/CFLAGS64 for AST sources
737c2fbfb3SApril Chin# (-xstrconst makes string litereals read-only and -xcsi works
747c2fbfb3SApril Chin# around compiler issues)
757c2fbfb3SApril ChinASTCFLAGS = \
767c2fbfb3SApril Chin	$(CCVERBOSE) \
777c2fbfb3SApril Chin	-_cc=-xcsi \
787c2fbfb3SApril Chin	-xstrconst
797c2fbfb3SApril ChinASTCFLAGS64 = \
807c2fbfb3SApril Chin	$(CCVERBOSE) \
817c2fbfb3SApril Chin	-_cc=-xcsi \
827c2fbfb3SApril Chin	-xstrconst
83