xref: /titanic_41/usr/src/lib/libshell/Makefile.com (revision eb0cc229f19c437a6b538d3ac0d0443268290b7e)
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 2007 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)
121
122# load dll, socket, and secdb libraries on demand
123LDLIBS += \
124	-lcmd \
125	-z lazyload -ldll -z nolazyload \
126	-last \
127	-z lazyload -lsocket -lsecdb -z nolazyload \
128	-lm -lc
129
130$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
131
132SRCDIR =	../common
133
134# 1. Make sure that the -D/-U defines in CPPFLAGS below are in sync
135# with usr/src/cmd/ksh/Makefile.com
136# 2. We use "=" here since using $(CPPFLAGS.master) is very tricky in our
137# case - it MUST come as the last element but future changes in -D options
138# may then cause silent breakage in the AST sources because the last -D
139# option specified overrides previous -D options so we prefer the current
140# way to explicitly list each single flag.
141CPPFLAGS = \
142	$(DTEXTDOM) $(DTS_ERRNO) \
143	-Isrc/cmd/ksh93 \
144	-I../common/include \
145	$(LIBSHELLCPPFLAGS)
146
147
148CFLAGS += \
149	$(CCVERBOSE) \
150	-xstrconst
151CFLAGS64 += \
152	$(CCVERBOSE) \
153	-xstrconst
154
155.KEEP_STATE:
156
157all: mkpicdirs .WAIT $(LIBS)
158
159#
160# libshell is not lint-clean yet; fake up a target.  (You can use
161# "make lintcheck" to actually run lint; please send all lint fixes
162# upstream (to AT&T) so the next update will pull them into ON.)
163#
164lint:
165	@ print "usr/src/lib/libshell is not lint-clean: skipping"
166	@ $(TRUE)
167
168include ../../Makefile.targ
169