xref: /titanic_44/usr/src/lib/libshell/Makefile.com (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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#
23134a1f4eSCasper H.S. Dik# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24da2e3ebdSchin#
25da2e3ebdSchin
267c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
27da2e3ebdSchin
28da2e3ebdSchinLIBRARY=	libshell.a
29da2e3ebdSchinVERS=		.1
30da2e3ebdSchin
31da2e3ebdSchinOBJECTS= \
32da2e3ebdSchin	bltins/alarm.o \
33da2e3ebdSchin	bltins/cd_pwd.o \
34da2e3ebdSchin	bltins/cflow.o \
357c2fbfb3SApril Chin	bltins/enum.o \
36da2e3ebdSchin	bltins/getopts.o \
37da2e3ebdSchin	bltins/hist.o \
38da2e3ebdSchin	bltins/misc.o \
3934f9b3eeSRoland Mainz	bltins/poll_solaris.o \
40da2e3ebdSchin	bltins/print.o \
41da2e3ebdSchin	bltins/read.o \
4234f9b3eeSRoland Mainz	bltins/regress.o \
43da2e3ebdSchin	bltins/shiocmd_solaris.o \
44da2e3ebdSchin	bltins/sleep.o \
45da2e3ebdSchin	bltins/test.o \
46da2e3ebdSchin	bltins/trap.o \
47da2e3ebdSchin	bltins/typeset.o \
48da2e3ebdSchin	bltins/ulimit.o \
49da2e3ebdSchin	bltins/umask.o \
50da2e3ebdSchin	bltins/whence.o \
51da2e3ebdSchin	data/aliases.o \
52da2e3ebdSchin	data/builtins.o \
53da2e3ebdSchin	data/keywords.o \
54da2e3ebdSchin	data/lexstates.o \
55da2e3ebdSchin	data/limits.o \
56da2e3ebdSchin	data/msg.o \
57da2e3ebdSchin	data/options.o \
58da2e3ebdSchin	data/signals.o \
59da2e3ebdSchin	data/strdata.o \
60da2e3ebdSchin	data/testops.o \
61da2e3ebdSchin	data/variables.o \
62da2e3ebdSchin	edit/completion.o \
63da2e3ebdSchin	edit/edit.o \
64da2e3ebdSchin	edit/emacs.o \
65da2e3ebdSchin	edit/hexpand.o \
66da2e3ebdSchin	edit/history.o \
67da2e3ebdSchin	edit/vi.o \
68da2e3ebdSchin	sh/args.o \
69da2e3ebdSchin	sh/arith.o \
70da2e3ebdSchin	sh/array.o \
71da2e3ebdSchin	sh/defs.o \
72da2e3ebdSchin	sh/deparse.o \
73da2e3ebdSchin	sh/expand.o \
74da2e3ebdSchin	sh/fault.o \
75da2e3ebdSchin	sh/fcin.o \
76da2e3ebdSchin	sh/init.o \
77da2e3ebdSchin	sh/io.o \
78da2e3ebdSchin	sh/jobs.o \
79da2e3ebdSchin	sh/lex.o \
80da2e3ebdSchin	sh/macro.o \
81da2e3ebdSchin	sh/main.o \
82da2e3ebdSchin	sh/name.o \
83da2e3ebdSchin	sh/nvdisc.o \
84da2e3ebdSchin	sh/nvtree.o \
857c2fbfb3SApril Chin	sh/nvtype.o \
86da2e3ebdSchin	sh/parse.o \
87da2e3ebdSchin	sh/path.o \
88da2e3ebdSchin	sh/streval.o \
89da2e3ebdSchin	sh/string.o \
90da2e3ebdSchin	sh/subshell.o \
91da2e3ebdSchin	sh/tdump.o \
92da2e3ebdSchin	sh/timers.o \
93da2e3ebdSchin	sh/trestore.o \
94da2e3ebdSchin	sh/waitevent.o \
95da2e3ebdSchin	sh/xec.o
96da2e3ebdSchin
97da2e3ebdSchin# We are storing the object files into subdirs avoid the
98da2e3ebdSchin# confusion with having too many object files in the toplevel pics/
99da2e3ebdSchin# directory (this matches the way how the original AST build system
100da2e3ebdSchin# deals with this "logistic" issue) - the rules below ensure that
101da2e3ebdSchin# the destination directory is available.
102da2e3ebdSchinOBJDIRS =  \
103da2e3ebdSchin	bltins \
104da2e3ebdSchin	data \
105da2e3ebdSchin	edit \
106da2e3ebdSchin	sh
107da2e3ebdSchinPICSDIRS= $(OBJDIRS:%=pics/%)
108da2e3ebdSchinmkpicdirs:
109da2e3ebdSchin	@mkdir -p $(PICSDIRS)
110da2e3ebdSchin
1117c2fbfb3SApril Chin# Specify the MACH we currently use to build and test ksh
1127c2fbfb3SApril ChinLIBSHELLMACH= $(TARGETMACH)
1137c2fbfb3SApril ChinLIBSHELLBASE=..
1147c2fbfb3SApril Chin
115da2e3ebdSchininclude ../../Makefile.astmsg
116da2e3ebdSchin
117da2e3ebdSchininclude ../../Makefile.lib
118da2e3ebdSchin
119da2e3ebdSchin# mapfile-vers does not live with the sources in in common/ to make
120da2e3ebdSchin# automated code updates easier.
121da2e3ebdSchinMAPFILES=       ../mapfile-vers
122da2e3ebdSchin
1237c2fbfb3SApril Chin# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
124da2e3ebdSchininclude ../../../Makefile.ast
125da2e3ebdSchin
126da2e3ebdSchinLIBS =		$(DYNLIB) $(LINTLIB)
1277c2fbfb3SApril Chin
1287c2fbfb3SApril ChinLDLIBS += \
1297c2fbfb3SApril Chin	-lcmd \
1307c2fbfb3SApril Chin	-ldll \
1317c2fbfb3SApril Chin	-last \
1327c2fbfb3SApril Chin	-lsocket \
1337c2fbfb3SApril Chin	-lm \
1347c2fbfb3SApril Chin	-lc
135da2e3ebdSchin
136da2e3ebdSchin$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
137da2e3ebdSchin
138da2e3ebdSchinSRCDIR =	../common
139da2e3ebdSchin
140da2e3ebdSchin# 1. Make sure that the -D/-U defines in CPPFLAGS below are in sync
141da2e3ebdSchin# with usr/src/cmd/ksh/Makefile.com
142da2e3ebdSchin# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
143da2e3ebdSchin# case - it MUST come as the last element but future changes in -D options
144da2e3ebdSchin# may then cause silent breakage in the AST sources because the last -D
145da2e3ebdSchin# option specified overrides previous -D options so we prefer the current
146da2e3ebdSchin# way to explicitly list each single flag.
147da2e3ebdSchinCPPFLAGS = \
148da2e3ebdSchin	$(DTEXTDOM) $(DTS_ERRNO) \
149da2e3ebdSchin	$(LIBSHELLCPPFLAGS)
150da2e3ebdSchin
151da2e3ebdSchinCFLAGS += \
1527c2fbfb3SApril Chin	$(ASTCFLAGS)
153da2e3ebdSchinCFLAGS64 += \
1547c2fbfb3SApril Chin	$(ASTCFLAGS64)
155*7014882cSRichard Lowe
156*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
157*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-value
158*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
159*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-function
160*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
161*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-clobbered
162*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-char-subscripts
1637c2fbfb3SApril Chin
1647c2fbfb3SApril Chinpics/sh/macro.o		:= CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
1657c2fbfb3SApril Chinpics/sh/nvdisc.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
166da2e3ebdSchin
167da2e3ebdSchin.KEEP_STATE:
168da2e3ebdSchin
169da2e3ebdSchinall: mkpicdirs .WAIT $(LIBS)
170da2e3ebdSchin
171da2e3ebdSchin#
172da2e3ebdSchin# libshell is not lint-clean yet; fake up a target.  (You can use
173da2e3ebdSchin# "make lintcheck" to actually run lint; please send all lint fixes
174da2e3ebdSchin# upstream (to AT&T) so the next update will pull them into ON.)
175da2e3ebdSchin#
176da2e3ebdSchinlint:
177da2e3ebdSchin	@ print "usr/src/lib/libshell is not lint-clean: skipping"
178da2e3ebdSchin
179da2e3ebdSchininclude ../../Makefile.targ
180