xref: /titanic_41/usr/src/lib/libcmd/Makefile.com (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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#
217c2fbfb3SApril Chin
227c478bd9Sstevel@tonic-gate#
233e14f97fSRoger A. Faulkner# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c2fbfb3SApril Chin
277c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
28da2e3ebdSchin
297c478bd9Sstevel@tonic-gateLIBRARY =	libcmd.a
307c478bd9Sstevel@tonic-gateVERS =		.1
31da2e3ebdSchinOBJECTS =	\
32da2e3ebdSchin	basename.o \
33da2e3ebdSchin	cat.o \
34da2e3ebdSchin	chgrp.o \
357c2fbfb3SApril Chin	cksum.o \
36da2e3ebdSchin	chmod.o \
37da2e3ebdSchin	chown.o \
38da2e3ebdSchin	cmdinit.o \
39da2e3ebdSchin	cmp.o \
40da2e3ebdSchin	comm.o \
41da2e3ebdSchin	cp.o \
42da2e3ebdSchin	cut.o \
43da2e3ebdSchin	date.o \
44da2e3ebdSchin	dirname.o \
45da2e3ebdSchin	expr.o \
4634f9b3eeSRoland Mainz	grep.o \
47da2e3ebdSchin	fds.o \
48da2e3ebdSchin	fmt.o \
49da2e3ebdSchin	fold.o \
503e14f97fSRoger A. Faulkner	fts_fix.o \
51da2e3ebdSchin	getconf.o \
52da2e3ebdSchin	head.o \
53da2e3ebdSchin	id.o \
54da2e3ebdSchin	join.o \
55da2e3ebdSchin	ln.o \
56da2e3ebdSchin	logname.o \
577c2fbfb3SApril Chin	md5sum.o \
58da2e3ebdSchin	mkdir.o \
59da2e3ebdSchin	mkfifo.o \
6034f9b3eeSRoland Mainz	mktemp.o \
61da2e3ebdSchin	mv.o \
62da2e3ebdSchin	paste.o \
63da2e3ebdSchin	pathchk.o \
647c2fbfb3SApril Chin	pids.o \
657c2fbfb3SApril Chin	readlink.o \
66da2e3ebdSchin	rev.o \
67da2e3ebdSchin	revlib.o \
68da2e3ebdSchin	rm.o \
69da2e3ebdSchin	rmdir.o \
70da2e3ebdSchin	stty.o \
717c2fbfb3SApril Chin	sum.o \
72da2e3ebdSchin	sync.o \
73da2e3ebdSchin	tail.o \
74da2e3ebdSchin	tee.o \
75da2e3ebdSchin	tty.o \
76da2e3ebdSchin	uname.o \
77da2e3ebdSchin	uniq.o \
783e14f97fSRoger A. Faulkner	vmstate.o \
79da2e3ebdSchin	wc.o \
80da2e3ebdSchin	wclib.o
81da2e3ebdSchin
82da2e3ebdSchininclude ../../Makefile.astmsg
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateinclude ../../Makefile.lib
857c478bd9Sstevel@tonic-gate
86da2e3ebdSchin# mapfile-vers does not live with the sources in in common/ to make
87da2e3ebdSchin# automated code updates easier.
88da2e3ebdSchinMAPFILES=       ../mapfile-vers
89da2e3ebdSchin
907c2fbfb3SApril Chin# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
91da2e3ebdSchininclude ../../../Makefile.ast
92da2e3ebdSchin
937c478bd9Sstevel@tonic-gateLIBS =		$(DYNLIB) $(LINTLIB)
947c478bd9Sstevel@tonic-gate
95da2e3ebdSchin$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
967c2fbfb3SApril Chin
977c2fbfb3SApril ChinLDLIBS += \
987c2fbfb3SApril Chin	-lsum \
997c2fbfb3SApril Chin	-last \
1007c2fbfb3SApril Chin	-lsocket \
1017c2fbfb3SApril Chin	-lnsl \
1027c2fbfb3SApril Chin	-lc
1037c478bd9Sstevel@tonic-gate
1047c478bd9Sstevel@tonic-gateSRCDIR =	../common
1057c478bd9Sstevel@tonic-gate
106da2e3ebdSchin# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
107da2e3ebdSchin# case - it MUST come as the last element but future changes in -D options
108da2e3ebdSchin# may then cause silent breakage in the AST sources because the last -D
109da2e3ebdSchin# option specified overrides previous -D options so we prefer the current
110da2e3ebdSchin# way to explicitly list each single flag.
111da2e3ebdSchin# Notes:
112da2e3ebdSchin#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
113da2e3ebdSchinCPPFLAGS = \
114da2e3ebdSchin	$(DTEXTDOM) $(DTS_ERRNO) \
115da2e3ebdSchin	-I../common \
116da2e3ebdSchin	-Isrc/lib/libcmd \
117da2e3ebdSchin	-I$(ROOT)/usr/include/ast \
11834f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
119da2e3ebdSchin	-D_BLD_cmd \
120da2e3ebdSchin	-D_PACKAGE_ast \
121da2e3ebdSchin	-D_BLD_DLL \
122da2e3ebdSchin	'-DERROR_CATALOG="libcmd"' \
123da2e3ebdSchin	'-DUSAGE_LICENSE=\
124da2e3ebdSchin		"[-author?Glenn Fowler <gsf@research.att.com>]"\
125da2e3ebdSchin		"[-author?David Korn <dgk@research.att.com>]"\
1263e14f97fSRoger A. Faulkner		"[-copyright?Copyright (c) 1992-2010 AT&T Intellectual Property]"\
127da2e3ebdSchin		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
128da2e3ebdSchin		"[--catalog?libcmd]"'
129da2e3ebdSchin
130da2e3ebdSchinCFLAGS += \
1317c2fbfb3SApril Chin	$(ASTCFLAGS)
132da2e3ebdSchinCFLAGS64 += \
1337c2fbfb3SApril Chin	$(ASTCFLAGS64)
134da2e3ebdSchin
135*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-value
136*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
137*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
138*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
139*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-implicit-function-declaration
140*7014882cSRichard Lowe
1413e14f97fSRoger A. Faulknerpics/cut.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
142da2e3ebdSchinpics/sync.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
1433e14f97fSRoger A. Faulknerpics/vmstate.o	:= CERRWARN += -erroff=E_NO_IMPLICIT_DECL_ALLOWED
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gate.KEEP_STATE:
1467c478bd9Sstevel@tonic-gate
147da2e3ebdSchinall: $(LIBS)
1487c478bd9Sstevel@tonic-gate
149da2e3ebdSchin#
150da2e3ebdSchin# libcmd is not lint-clean yet; fake up a target.  (You can use
151da2e3ebdSchin# "make lintcheck" to actually run lint; please send all lint fixes
152da2e3ebdSchin# upstream (to AT&T) so the next update will pull them into ON.)
153da2e3ebdSchin#
154da2e3ebdSchinlint:
155da2e3ebdSchin	@ print "usr/src/lib/libcmd is not lint-clean: skipping"
1567c478bd9Sstevel@tonic-gate
1577c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
158