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