xref: /titanic_44/usr/src/lib/libshell/Makefile.com (revision 62a24de03df1f2399ceda704cb3874dabc98bbbd)
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# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28SHELL=/usr/bin/ksh
29
30LIBRARY=	libshell.a
31VERS=		.1
32
33OBJECTS= \
34	bltins/alarm.o \
35	bltins/cd_pwd.o \
36	bltins/cflow.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/parse.o \
85	sh/path.o \
86	sh/streval.o \
87	sh/string.o \
88	sh/subshell.o \
89	sh/tdump.o \
90	sh/timers.o \
91	sh/trestore.o \
92	sh/waitevent.o \
93	sh/xec.o
94
95# We are storing the object files into subdirs avoid the
96# confusion with having too many object files in the toplevel pics/
97# directory (this matches the way how the original AST build system
98# deals with this "logistic" issue) - the rules below ensure that
99# the destination directory is available.
100OBJDIRS =  \
101	bltins \
102	data \
103	edit \
104	sh
105PICSDIRS= $(OBJDIRS:%=pics/%)
106mkpicdirs:
107	@mkdir -p $(PICSDIRS)
108
109include ../../Makefile.astmsg
110
111include ../../Makefile.lib
112
113# mapfile-vers does not live with the sources in in common/ to make
114# automated code updates easier.
115MAPFILES=       ../mapfile-vers
116
117# Set common AST build flags (e.g., needed to support the math stuff).
118include ../../../Makefile.ast
119
120LIBS =		$(DYNLIB) $(LINTLIB)
121LDLIBS +=	-lcmd -ldll -last -lsocket -lsecdb -lm -lc
122
123$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
124
125SRCDIR =	../common
126
127# 1. Make sure that the -D/-U defines in CPPFLAGS below are in sync
128# with usr/src/cmd/ksh/Makefile.com
129# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
130# case - it MUST come as the last element but future changes in -D options
131# may then cause silent breakage in the AST sources because the last -D
132# option specified overrides previous -D options so we prefer the current
133# way to explicitly list each single flag.
134CPPFLAGS = \
135	$(DTEXTDOM) $(DTS_ERRNO) \
136	-Isrc/cmd/ksh93 \
137	-I../common/include \
138	$(LIBSHELLCPPFLAGS)
139
140
141CFLAGS += \
142	$(CCVERBOSE) \
143	-xstrconst
144CFLAGS64 += \
145	$(CCVERBOSE) \
146	-xstrconst
147
148.KEEP_STATE:
149
150all: mkpicdirs .WAIT $(LIBS)
151
152#
153# libshell is not lint-clean yet; fake up a target.  (You can use
154# "make lintcheck" to actually run lint; please send all lint fixes
155# upstream (to AT&T) so the next update will pull them into ON.)
156#
157lint:
158	@ print "usr/src/lib/libshell is not lint-clean: skipping"
159	@ $(TRUE)
160
161include ../../Makefile.targ
162