xref: /titanic_44/usr/src/lib/libcmd/Makefile.com (revision b018c462323433fb125f9b7e871a93d07a5e481d)
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 2008 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 +=	-last -lsocket -lnsl -lc
89
90SRCDIR =	../common
91
92# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
93# case - it MUST come as the last element but future changes in -D options
94# may then cause silent breakage in the AST sources because the last -D
95# option specified overrides previous -D options so we prefer the current
96# way to explicitly list each single flag.
97# Notes:
98#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
99CPPFLAGS = \
100	$(DTEXTDOM) $(DTS_ERRNO) \
101	-I../common \
102	-Isrc/lib/libcmd \
103	-I$(ROOT)/usr/include/ast \
104	-D_BLD_cmd \
105	-D_PACKAGE_ast \
106	-D_BLD_DLL \
107	'-DERROR_CATALOG="libcmd"' \
108	'-DUSAGE_LICENSE=\
109		"[-author?Glenn Fowler <gsf@research.att.com>]"\
110		"[-author?David Korn <dgk@research.att.com>]"\
111		"[-copyright?Copyright (c) 1992-2007 AT&T Knowledge Ventures]"\
112		"[-license?http://www.opensource.org/licenses/cpl1.0.txt]"\
113		"[--catalog?libcmd]"'
114
115CFLAGS += \
116	$(CCVERBOSE) \
117	-xstrconst
118CFLAGS64 += \
119	$(CCVERBOSE) \
120	-xstrconst
121
122pics/sync.o	:= CERRWARN += -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
123
124.KEEP_STATE:
125
126all: $(LIBS)
127
128#
129# libcmd is not lint-clean yet; fake up a target.  (You can use
130# "make lintcheck" to actually run lint; please send all lint fixes
131# upstream (to AT&T) so the next update will pull them into ON.)
132#
133lint:
134	@ print "usr/src/lib/libcmd is not lint-clean: skipping"
135	@ $(TRUE)
136
137include ../../Makefile.targ
138