xref: /titanic_44/usr/src/Makefile.ast (revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5)
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*34f9b3eeSRoland Mainz# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24da2e3ebdSchin# Use is subject to license terms.
25da2e3ebdSchin#
26da2e3ebdSchin
27da2e3ebdSchin# Override this top level flag so the compiler builds in its native
28da2e3ebdSchin# C99 mode.  This has been enabled to support the math stuff in the
29da2e3ebdSchin# AST tools (including ksh93).
30da2e3ebdSchinC99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
31da2e3ebdSchin
32da2e3ebdSchin# silence common AST&co. warnings...
33da2e3ebdSchin# ... about |#pragma prototyped| ...
34da2e3ebdSchinCERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
35da2e3ebdSchin
367c2fbfb3SApril Chin# common CPP flags for libshell consumers (ksh, shcomp etc.)
37da2e3ebdSchinLIBSHELLCPPFLAGS = \
387c2fbfb3SApril Chin	-I$(LIBSHELLBASE)/$(LIBSHELLMACH)/src/cmd/ksh93 \
397c2fbfb3SApril Chin	-I$(LIBSHELLBASE)/common/include \
40da2e3ebdSchin	-I$(ROOT)/usr/include/ast \
41*34f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
42da2e3ebdSchin	-DKSHELL \
43*34f9b3eeSRoland Mainz	-DSHOPT_BGX \
44da2e3ebdSchin	-DSHOPT_BRACEPAT \
45da2e3ebdSchin	-DSHOPT_CMDLIB_BLTIN=0 \
46da2e3ebdSchin	'-DSH_CMDLIB_DIR="/usr/ast/bin"' \
47da2e3ebdSchin	'-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"' \
48da2e3ebdSchin	-DSHOPT_DYNAMIC \
49da2e3ebdSchin	-DSHOPT_ESH \
50da2e3ebdSchin	-DSHOPT_FILESCAN \
51da2e3ebdSchin	-DSHOPT_HISTEXPAND \
52da2e3ebdSchin	-DSHOPT_KIA \
53da2e3ebdSchin	-DSHOPT_MULTIBYTE \
54da2e3ebdSchin	-DSHOPT_NAMESPACE \
55da2e3ebdSchin	-DSHOPT_OPTIMIZE \
56da2e3ebdSchin	-DSHOPT_PFSH \
57da2e3ebdSchin	-DSHOPT_RAWONLY \
587c2fbfb3SApril Chin	-DSHOPT_STATS \
59da2e3ebdSchin	-DSHOPT_SUID_EXEC \
60da2e3ebdSchin	-DSHOPT_SYSRC \
617c2fbfb3SApril Chin	-DSHOPT_TYPEDEF \
62da2e3ebdSchin	-DSHOPT_VSH \
63da2e3ebdSchin	-D_BLD_shell \
64da2e3ebdSchin	-D_PACKAGE_ast \
657c2fbfb3SApril Chin	'-DERROR_CATALOG="libshell"' \
66da2e3ebdSchin	-DERROR_CONTEXT_T=Error_context_t \
67da2e3ebdSchin	'-DUSAGE_LICENSE=\
68da2e3ebdSchin		"[-author?David Korn <dgk@research.att.com>]"\
69*34f9b3eeSRoland Mainz		"[-copyright?Copyright (c) 1982-2009 AT&T Intellectual Property]"\
70da2e3ebdSchin		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
71da2e3ebdSchin		"[--catalog?libshell]"'
72da2e3ebdSchin
737c2fbfb3SApril Chin# Default CFLAGS/CFLAGS64 for AST sources
747c2fbfb3SApril Chin# (-xstrconst makes string litereals read-only and -xcsi works
757c2fbfb3SApril Chin# around compiler issues)
767c2fbfb3SApril ChinASTCFLAGS = \
777c2fbfb3SApril Chin	$(CCVERBOSE) \
787c2fbfb3SApril Chin	-_cc=-xcsi \
797c2fbfb3SApril Chin	-xstrconst
807c2fbfb3SApril ChinASTCFLAGS64 = \
817c2fbfb3SApril Chin	$(CCVERBOSE) \
827c2fbfb3SApril Chin	-_cc=-xcsi \
837c2fbfb3SApril Chin	-xstrconst
84da2e3ebdSchin
857c2fbfb3SApril Chin# We need this for C99/VLA support
867c2fbfb3SApril ChinDEBUGFORMAT=-xdebugformat=dwarf
87