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# 21*7c2fbfb3SApril Chin 22da2e3ebdSchin# 23*7c2fbfb3SApril Chin# Copyright 2008 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 36*7c2fbfb3SApril Chin# common CPP flags for libshell consumers (ksh, shcomp etc.) 37da2e3ebdSchinLIBSHELLCPPFLAGS = \ 38*7c2fbfb3SApril Chin -I$(LIBSHELLBASE)/$(LIBSHELLMACH)/src/cmd/ksh93 \ 39*7c2fbfb3SApril Chin -I$(LIBSHELLBASE)/common/include \ 40da2e3ebdSchin -I$(ROOT)/usr/include/ast \ 41da2e3ebdSchin -DKSHELL \ 42da2e3ebdSchin -DSHOPT_BRACEPAT \ 43da2e3ebdSchin -DSHOPT_CMDLIB_BLTIN=0 \ 44da2e3ebdSchin '-DSH_CMDLIB_DIR="/usr/ast/bin"' \ 45da2e3ebdSchin '-DSHOPT_CMDLIB_HDR="solaris_cmdlist.h"' \ 46da2e3ebdSchin -DSHOPT_DYNAMIC \ 47da2e3ebdSchin -DSHOPT_ESH \ 48da2e3ebdSchin -DSHOPT_FILESCAN \ 49da2e3ebdSchin -DSHOPT_HISTEXPAND \ 50da2e3ebdSchin -DSHOPT_KIA \ 51da2e3ebdSchin -DSHOPT_MULTIBYTE \ 52da2e3ebdSchin -DSHOPT_NAMESPACE \ 53da2e3ebdSchin -DSHOPT_OPTIMIZE \ 54da2e3ebdSchin -DSHOPT_PFSH \ 55da2e3ebdSchin -DSHOPT_RAWONLY \ 56*7c2fbfb3SApril Chin -DSHOPT_STATS \ 57da2e3ebdSchin -DSHOPT_SUID_EXEC \ 58da2e3ebdSchin -DSHOPT_SYSRC \ 59*7c2fbfb3SApril Chin -DSHOPT_TYPEDEF \ 60da2e3ebdSchin -DSHOPT_VSH \ 61da2e3ebdSchin -D_BLD_shell \ 62da2e3ebdSchin -D_PACKAGE_ast \ 63*7c2fbfb3SApril Chin '-DERROR_CATALOG="libshell"' \ 64da2e3ebdSchin -DERROR_CONTEXT_T=Error_context_t \ 65da2e3ebdSchin '-DUSAGE_LICENSE=\ 66da2e3ebdSchin "[-author?David Korn <dgk@research.att.com>]"\ 67*7c2fbfb3SApril Chin "[-copyright?Copyright (c) 1982-2008 AT&T Intellectual Property]"\ 68da2e3ebdSchin "[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\ 69da2e3ebdSchin "[--catalog?libshell]"' 70da2e3ebdSchin 71*7c2fbfb3SApril Chin# Default CFLAGS/CFLAGS64 for AST sources 72*7c2fbfb3SApril Chin# (-xstrconst makes string litereals read-only and -xcsi works 73*7c2fbfb3SApril Chin# around compiler issues) 74*7c2fbfb3SApril ChinASTCFLAGS = \ 75*7c2fbfb3SApril Chin $(CCVERBOSE) \ 76*7c2fbfb3SApril Chin -_cc=-xcsi \ 77*7c2fbfb3SApril Chin -xstrconst 78*7c2fbfb3SApril ChinASTCFLAGS64 = \ 79*7c2fbfb3SApril Chin $(CCVERBOSE) \ 80*7c2fbfb3SApril Chin -_cc=-xcsi \ 81*7c2fbfb3SApril Chin -xstrconst 82da2e3ebdSchin 83*7c2fbfb3SApril Chin# We need this for C99/VLA support 84*7c2fbfb3SApril ChinDEBUGFORMAT=-xdebugformat=dwarf 85