summaryrefslogtreecommitdiff
path: root/usr/src/Makefile.ast
blob: 1a85c1c7e71bd1eaec3b95089d806d51912539be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#

# Override this top level flag so the compiler builds in its native
# C99 mode.  This has been enabled to support the math stuff in the
# AST tools (including ksh93).
CSTD= $(CSTD_GNU99) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1

# silence common AST&co. warnings...
# ... about |#pragma prototyped| ...
CERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED

# common CPP flags for libshell consumers (ksh, shcomp etc.)
LIBSHELLCPPFLAGS = \
	-I$(LIBSHELLBASE)/$(LIBSHELLMACH)/src/cmd/ksh93 \
	-I$(LIBSHELLBASE)/common/include \
	-I$(ROOT)/usr/include/ast \
	-I$(ROOT)/usr/include \
	-DKSHELL \
	-DSHOPT_BGX \
	-DSHOPT_BRACEPAT \
	-DSHOPT_CMDLIB_BLTIN=0 \
	'-DSH_CMDLIB_DIR="/usr/ast/bin"' \
	'-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"' \
	-DSHOPT_DYNAMIC \
	-DSHOPT_ESH \
	-DSHOPT_FILESCAN \
	-DSHOPT_HISTEXPAND \
	-DSHOPT_KIA \
	-DSHOPT_MULTIBYTE \
	-DSHOPT_NAMESPACE \
	-DSHOPT_OPTIMIZE \
	-DSHOPT_PFSH \
	-DSHOPT_RAWONLY \
	-DSHOPT_STATS \
	-DSHOPT_SUID_EXEC \
	-DSHOPT_SYSRC \
	-DSHOPT_TYPEDEF \
	-DSHOPT_VSH \
	-D_BLD_shell \
	-D_PACKAGE_ast \
	'-DERROR_CATALOG="libshell"' \
	-DERROR_CONTEXT_T=Error_context_t \
	'-DUSAGE_LICENSE=\
		"[-author?David Korn <dgk@research.att.com>]"\
		"[-copyright?Copyright (c) 1982-2010 AT&T Intellectual Property]"\
		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
		"[--catalog?libshell]"'

# Default CFLAGS/CFLAGS64 for AST sources
# (-xstrconst makes string litereals read-only and -xcsi works 
# around compiler issues)
ASTCFLAGS = \
	$(CCVERBOSE) \
	-_cc=-xcsi \
	-xstrconst
ASTCFLAGS64 = \
	$(CCVERBOSE) \
	-_cc=-xcsi \
	-xstrconst