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