xref: /onnv-gate/usr/src/Makefile.ast (revision 12068:08a39a083754)
14887Schin#
24887Schin# CDDL HEADER START
34887Schin#
44887Schin# The contents of this file are subject to the terms of the
54887Schin# Common Development and Distribution License (the "License").
64887Schin# You may not use this file except in compliance with the License.
74887Schin#
84887Schin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
94887Schin# or http://www.opensolaris.org/os/licensing.
104887Schin# See the License for the specific language governing permissions
114887Schin# and limitations under the License.
124887Schin#
134887Schin# When distributing Covered Code, include this CDDL HEADER in each
144887Schin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154887Schin# If applicable, add the following below this CDDL HEADER, with the
164887Schin# fields enclosed by brackets "[]" replaced with your own identifying
174887Schin# information: Portions Copyright [yyyy] [name of copyright owner]
184887Schin#
194887Schin# CDDL HEADER END
204887Schin#
218462SApril.Chin@Sun.COM
224887Schin#
23*12068SRoger.Faulkner@Oracle.COM# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
244887Schin#
254887Schin
264887Schin# Override this top level flag so the compiler builds in its native
274887Schin# C99 mode.  This has been enabled to support the math stuff in the
284887Schin# AST tools (including ksh93).
294887SchinC99MODE= $(C99_ENABLE) -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1
304887Schin
314887Schin# silence common AST&co. warnings...
324887Schin# ... about |#pragma prototyped| ...
334887SchinCERRWARN += -erroff=E_UNRECOGNIZED_PRAGMA_IGNORED
344887Schin
358462SApril.Chin@Sun.COM# common CPP flags for libshell consumers (ksh, shcomp etc.)
364887SchinLIBSHELLCPPFLAGS = \
378462SApril.Chin@Sun.COM	-I$(LIBSHELLBASE)/$(LIBSHELLMACH)/src/cmd/ksh93 \
388462SApril.Chin@Sun.COM	-I$(LIBSHELLBASE)/common/include \
394887Schin	-I$(ROOT)/usr/include/ast \
4010898Sroland.mainz@nrubsig.org	-I$(ROOT)/usr/include \
414887Schin	-DKSHELL \
4210898Sroland.mainz@nrubsig.org	-DSHOPT_BGX \
434887Schin	-DSHOPT_BRACEPAT \
444887Schin	-DSHOPT_CMDLIB_BLTIN=0 \
454887Schin	'-DSH_CMDLIB_DIR="/usr/ast/bin"' \
464887Schin	'-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"' \
474887Schin	-DSHOPT_DYNAMIC \
484887Schin	-DSHOPT_ESH \
494887Schin	-DSHOPT_FILESCAN \
504887Schin	-DSHOPT_HISTEXPAND \
514887Schin	-DSHOPT_KIA \
524887Schin	-DSHOPT_MULTIBYTE \
534887Schin	-DSHOPT_NAMESPACE \
544887Schin	-DSHOPT_OPTIMIZE \
554887Schin	-DSHOPT_PFSH \
564887Schin	-DSHOPT_RAWONLY \
578462SApril.Chin@Sun.COM	-DSHOPT_STATS \
584887Schin	-DSHOPT_SUID_EXEC \
594887Schin	-DSHOPT_SYSRC \
608462SApril.Chin@Sun.COM	-DSHOPT_TYPEDEF \
614887Schin	-DSHOPT_VSH \
624887Schin	-D_BLD_shell \
634887Schin	-D_PACKAGE_ast \
648462SApril.Chin@Sun.COM	'-DERROR_CATALOG="libshell"' \
654887Schin	-DERROR_CONTEXT_T=Error_context_t \
664887Schin	'-DUSAGE_LICENSE=\
674887Schin		"[-author?David Korn <dgk@research.att.com>]"\
68*12068SRoger.Faulkner@Oracle.COM		"[-copyright?Copyright (c) 1982-2010 AT&T Intellectual Property]"\
694887Schin		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
704887Schin		"[--catalog?libshell]"'
714887Schin
728462SApril.Chin@Sun.COM# Default CFLAGS/CFLAGS64 for AST sources
738462SApril.Chin@Sun.COM# (-xstrconst makes string litereals read-only and -xcsi works
748462SApril.Chin@Sun.COM# around compiler issues)
758462SApril.Chin@Sun.COMASTCFLAGS = \
768462SApril.Chin@Sun.COM	$(CCVERBOSE) \
778462SApril.Chin@Sun.COM	-_cc=-xcsi \
788462SApril.Chin@Sun.COM	-xstrconst
798462SApril.Chin@Sun.COMASTCFLAGS64 = \
808462SApril.Chin@Sun.COM	$(CCVERBOSE) \
818462SApril.Chin@Sun.COM	-_cc=-xcsi \
828462SApril.Chin@Sun.COM	-xstrconst
838462SApril.Chin@Sun.COM
848462SApril.Chin@Sun.COM# We need this for C99/VLA support
858462SApril.Chin@Sun.COMDEBUGFORMAT=-xdebugformat=dwarf
86