xref: /titanic_51/usr/src/lib/libcmd/Makefile.com (revision 843e19887f64dde75055cf8842fc4db2171eff45)
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 =	libcmd.a
31VERS =		.1
32OBJECTS =	\
33	basename.o \
34	cat.o \
35	chgrp.o \
36	chmod.o \
37	chown.o \
38	cmdinit.o \
39	cmp.o \
40	comm.o \
41	cp.o \
42	cut.o \
43	date.o \
44	dirname.o \
45	expr.o \
46	fds.o \
47	fmt.o \
48	fold.o \
49	getconf.o \
50	head.o \
51	id.o \
52	join.o \
53	ln.o \
54	logname.o \
55	mkdir.o \
56	mkfifo.o \
57	mv.o \
58	paste.o \
59	pathchk.o \
60	rev.o \
61	revlib.o \
62	rm.o \
63	rmdir.o \
64	stty.o \
65	sync.o \
66	tail.o \
67	tee.o \
68	tty.o \
69	uname.o \
70	uniq.o \
71	wc.o \
72	wclib.o
73
74include ../../Makefile.astmsg
75
76include ../../Makefile.lib
77
78# mapfile-vers does not live with the sources in in common/ to make
79# automated code updates easier.
80MAPFILES=       ../mapfile-vers
81
82# Set common AST build flags (e.g., needed to support the math stuff).
83include ../../../Makefile.ast
84
85LIBS =		$(DYNLIB) $(LINTLIB)
86
87$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
88LDLIBS += \
89	-z lazyload -last -lsocket -lnsl -z nolazyload \
90	-lc
91
92SRCDIR =	../common
93
94# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
95# case - it MUST come as the last element but future changes in -D options
96# may then cause silent breakage in the AST sources because the last -D
97# option specified overrides previous -D options so we prefer the current
98# way to explicitly list each single flag.
99# Notes:
100#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
101CPPFLAGS = \
102	$(DTEXTDOM) $(DTS_ERRNO) \
103	-I../common \
104	-Isrc/lib/libcmd \
105	-I$(ROOT)/usr/include/ast \
106	-D_BLD_cmd \
107	-D_PACKAGE_ast \
108	-D_BLD_DLL \
109	'-DERROR_CATALOG="libcmd"' \
110	'-DUSAGE_LICENSE=\
111		"[-author?Glenn Fowler <gsf@research.att.com>]"\
112		"[-author?David Korn <dgk@research.att.com>]"\
113		"[-copyright?Copyright (c) 1992-2007 AT&T Knowledge Ventures]"\
114		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
115		"[--catalog?libcmd]"'
116
117CFLAGS += \
118	$(CCVERBOSE) \
119	-xstrconst
120CFLAGS64 += \
121	$(CCVERBOSE) \
122	-xstrconst
123
124pics/sync.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
125
126.KEEP_STATE:
127
128all: $(LIBS)
129
130#
131# libcmd is not lint-clean yet; fake up a target.  (You can use
132# "make lintcheck" to actually run lint; please send all lint fixes
133# upstream (to AT&T) so the next update will pull them into ON.)
134#
135lint:
136	@ print "usr/src/lib/libcmd is not lint-clean: skipping"
137	@ $(TRUE)
138
139include ../../Makefile.targ
140