xref: /titanic_51/usr/src/lib/libshell/Makefile.com (revision f657cd55755084dade71fb0c1d9f51994c226a70)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27SHELL=/usr/bin/ksh93
28
29LIBRARY=	libshell.a
30VERS=		.1
31
32OBJECTS= \
33	bltins/alarm.o \
34	bltins/cd_pwd.o \
35	bltins/cflow.o \
36	bltins/enum.o \
37	bltins/getopts.o \
38	bltins/hist.o \
39	bltins/misc.o \
40	bltins/print.o \
41	bltins/read.o \
42	bltins/shiocmd_solaris.o \
43	bltins/sleep.o \
44	bltins/test.o \
45	bltins/trap.o \
46	bltins/typeset.o \
47	bltins/ulimit.o \
48	bltins/umask.o \
49	bltins/whence.o \
50	data/aliases.o \
51	data/builtins.o \
52	data/keywords.o \
53	data/lexstates.o \
54	data/limits.o \
55	data/msg.o \
56	data/options.o \
57	data/signals.o \
58	data/strdata.o \
59	data/testops.o \
60	data/variables.o \
61	edit/completion.o \
62	edit/edit.o \
63	edit/emacs.o \
64	edit/hexpand.o \
65	edit/history.o \
66	edit/vi.o \
67	sh/args.o \
68	sh/arith.o \
69	sh/array.o \
70	sh/defs.o \
71	sh/deparse.o \
72	sh/expand.o \
73	sh/fault.o \
74	sh/fcin.o \
75	sh/init.o \
76	sh/io.o \
77	sh/jobs.o \
78	sh/lex.o \
79	sh/macro.o \
80	sh/main.o \
81	sh/name.o \
82	sh/nvdisc.o \
83	sh/nvtree.o \
84	sh/nvtype.o \
85	sh/parse.o \
86	sh/path.o \
87	sh/streval.o \
88	sh/string.o \
89	sh/subshell.o \
90	sh/tdump.o \
91	sh/timers.o \
92	sh/trestore.o \
93	sh/waitevent.o \
94	sh/xec.o
95
96# We are storing the object files into subdirs avoid the
97# confusion with having too many object files in the toplevel pics/
98# directory (this matches the way how the original AST build system
99# deals with this "logistic" issue) - the rules below ensure that
100# the destination directory is available.
101OBJDIRS =  \
102	bltins \
103	data \
104	edit \
105	sh
106PICSDIRS= $(OBJDIRS:%=pics/%)
107mkpicdirs:
108	@mkdir -p $(PICSDIRS)
109
110# Specify the MACH we currently use to build and test ksh
111LIBSHELLMACH= $(TARGETMACH)
112LIBSHELLBASE=..
113
114include ../../Makefile.astmsg
115
116include ../../Makefile.lib
117
118# mapfile-vers does not live with the sources in in common/ to make
119# automated code updates easier.
120MAPFILES=       ../mapfile-vers
121
122# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
123include ../../../Makefile.ast
124
125LIBS =		$(DYNLIB) $(LINTLIB)
126
127LDLIBS += \
128	-lcmd \
129	-ldll \
130	-last \
131	-lsocket \
132	-lsecdb \
133	-lm \
134	-lc
135
136$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
137
138SRCDIR =	../common
139
140# 1. Make sure that the -D/-U defines in CPPFLAGS below are in sync
141# with usr/src/cmd/ksh/Makefile.com
142# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
143# case - it MUST come as the last element but future changes in -D options
144# may then cause silent breakage in the AST sources because the last -D
145# option specified overrides previous -D options so we prefer the current
146# way to explicitly list each single flag.
147CPPFLAGS = \
148	$(DTEXTDOM) $(DTS_ERRNO) \
149	$(LIBSHELLCPPFLAGS)
150
151CFLAGS += \
152	$(ASTCFLAGS)
153CFLAGS64 += \
154	$(ASTCFLAGS64)
155
156pics/sh/macro.o		:= CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
157pics/sh/nvdisc.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
158
159.KEEP_STATE:
160
161all: mkpicdirs .WAIT $(LIBS)
162
163#
164# libshell is not lint-clean yet; fake up a target.  (You can use
165# "make lintcheck" to actually run lint; please send all lint fixes
166# upstream (to AT&T) so the next update will pull them into ON.)
167#
168lint:
169	@ print "usr/src/lib/libshell is not lint-clean: skipping"
170
171include ../../Makefile.targ
172