xref: /titanic_44/usr/src/lib/libcmd/Makefile.com (revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*da2e3ebdSchin# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
28*da2e3ebdSchinSHELL=/usr/bin/ksh
29*da2e3ebdSchin
307c478bd9Sstevel@tonic-gateLIBRARY =	libcmd.a
317c478bd9Sstevel@tonic-gateVERS =		.1
32*da2e3ebdSchinOBJECTS =	\
33*da2e3ebdSchin	basename.o \
34*da2e3ebdSchin	cat.o \
35*da2e3ebdSchin	chgrp.o \
36*da2e3ebdSchin	chmod.o \
37*da2e3ebdSchin	chown.o \
38*da2e3ebdSchin	cmdinit.o \
39*da2e3ebdSchin	cmp.o \
40*da2e3ebdSchin	comm.o \
41*da2e3ebdSchin	cp.o \
42*da2e3ebdSchin	cut.o \
43*da2e3ebdSchin	date.o \
44*da2e3ebdSchin	dirname.o \
45*da2e3ebdSchin	expr.o \
46*da2e3ebdSchin	fds.o \
47*da2e3ebdSchin	fmt.o \
48*da2e3ebdSchin	fold.o \
49*da2e3ebdSchin	getconf.o \
50*da2e3ebdSchin	head.o \
51*da2e3ebdSchin	id.o \
52*da2e3ebdSchin	join.o \
53*da2e3ebdSchin	ln.o \
54*da2e3ebdSchin	logname.o \
55*da2e3ebdSchin	mkdir.o \
56*da2e3ebdSchin	mkfifo.o \
57*da2e3ebdSchin	mv.o \
58*da2e3ebdSchin	paste.o \
59*da2e3ebdSchin	pathchk.o \
60*da2e3ebdSchin	rev.o \
61*da2e3ebdSchin	revlib.o \
62*da2e3ebdSchin	rm.o \
63*da2e3ebdSchin	rmdir.o \
64*da2e3ebdSchin	stty.o \
65*da2e3ebdSchin	sync.o \
66*da2e3ebdSchin	tail.o \
67*da2e3ebdSchin	tee.o \
68*da2e3ebdSchin	tty.o \
69*da2e3ebdSchin	uname.o \
70*da2e3ebdSchin	uniq.o \
71*da2e3ebdSchin	wc.o \
72*da2e3ebdSchin	wclib.o
73*da2e3ebdSchin
74*da2e3ebdSchininclude ../../Makefile.astmsg
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
777c478bd9Sstevel@tonic-gate
78*da2e3ebdSchin# mapfile-vers does not live with the sources in in common/ to make
79*da2e3ebdSchin# automated code updates easier.
80*da2e3ebdSchinMAPFILES=       ../mapfile-vers
81*da2e3ebdSchin
82*da2e3ebdSchin# Set common AST build flags (e.g., needed to support the math stuff).
83*da2e3ebdSchininclude ../../../Makefile.ast
84*da2e3ebdSchin
857c478bd9Sstevel@tonic-gateLIBS =		$(DYNLIB) $(LINTLIB)
867c478bd9Sstevel@tonic-gate
87*da2e3ebdSchin$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
88*da2e3ebdSchinLDLIBS += \
89*da2e3ebdSchin	-z lazyload -last -lsocket -lnsl -z nolazyload \
90*da2e3ebdSchin	-lc
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gateSRCDIR =	../common
937c478bd9Sstevel@tonic-gate
94*da2e3ebdSchin# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
95*da2e3ebdSchin# case - it MUST come as the last element but future changes in -D options
96*da2e3ebdSchin# may then cause silent breakage in the AST sources because the last -D
97*da2e3ebdSchin# option specified overrides previous -D options so we prefer the current
98*da2e3ebdSchin# way to explicitly list each single flag.
99*da2e3ebdSchin# Notes:
100*da2e3ebdSchin#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
101*da2e3ebdSchinCPPFLAGS = \
102*da2e3ebdSchin	$(DTEXTDOM) $(DTS_ERRNO) \
103*da2e3ebdSchin	-I../common \
104*da2e3ebdSchin	-Isrc/lib/libcmd \
105*da2e3ebdSchin	-I$(ROOT)/usr/include/ast \
106*da2e3ebdSchin	-D_BLD_cmd \
107*da2e3ebdSchin	-D_PACKAGE_ast \
108*da2e3ebdSchin	-D_BLD_DLL \
109*da2e3ebdSchin	'-DERROR_CATALOG="libcmd"' \
110*da2e3ebdSchin	'-DUSAGE_LICENSE=\
111*da2e3ebdSchin		"[-author?Glenn Fowler <gsf@research.att.com>]"\
112*da2e3ebdSchin		"[-author?David Korn <dgk@research.att.com>]"\
113*da2e3ebdSchin		"[-copyright?Copyright (c) 1992-2007 AT&T Knowledge Ventures]"\
114*da2e3ebdSchin		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
115*da2e3ebdSchin		"[--catalog?libcmd]"'
116*da2e3ebdSchin
117*da2e3ebdSchinCFLAGS += \
118*da2e3ebdSchin	$(CCVERBOSE) \
119*da2e3ebdSchin	-xstrconst
120*da2e3ebdSchinCFLAGS64 += \
121*da2e3ebdSchin	$(CCVERBOSE) \
122*da2e3ebdSchin	-xstrconst
123*da2e3ebdSchin
124*da2e3ebdSchinpics/sync.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gate.KEEP_STATE:
1277c478bd9Sstevel@tonic-gate
128*da2e3ebdSchinall: $(LIBS)
1297c478bd9Sstevel@tonic-gate
130*da2e3ebdSchin#
131*da2e3ebdSchin# libcmd is not lint-clean yet; fake up a target.  (You can use
132*da2e3ebdSchin# "make lintcheck" to actually run lint; please send all lint fixes
133*da2e3ebdSchin# upstream (to AT&T) so the next update will pull them into ON.)
134*da2e3ebdSchin#
135*da2e3ebdSchinlint:
136*da2e3ebdSchin	@ print "usr/src/lib/libcmd is not lint-clean: skipping"
137*da2e3ebdSchin	@ $(TRUE)
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
140