xref: /titanic_50/usr/src/cmd/pgrep/Makefile (revision 54925bf60766fbb4f1f2d7c843721406a7b7a3fb)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29PROG = pgrep
30PKILLFILE = pkill
31
32ROOTLINKS = $(ROOTBIN)/$(PKILLFILE)
33
34OBJS = pgrep.o idtab.o psexp.o
35SRCS = $(OBJS:.o=.c)
36POFILES = $(OBJS:.o=.po)
37lint := LINTFLAGS = -ux
38
39include ../Makefile.cmd
40
41CLOBBERFILES += $(PKILLFILE)
42CFLAGS += $(CCVERBOSE)
43LAZYLIBS = $(ZLAZYLOAD) -lproject -lcontract $(ZNOLAZYLOAD)
44lint := LAZYLIBS = -lproject -lcontract
45LDLIBS += -luutil $(LAZYLIBS)
46
47POFILE = ppgrep.po
48XGETFLAGS = -a -x pgrep.xcl
49
50FILEMODE = 0555
51GROUP = bin
52
53.KEEP_STATE:
54
55all: $(PROG) $(PKILLFILE)
56
57$(PKILLFILE): $(PROG)
58	$(RM) $@
59	$(LN) $(PROG) $@
60
61$(PROG): $(OBJS)
62	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
63	$(POST_PROCESS)
64
65$(POFILE):	$(POFILES)
66	$(RM) $@; cat $(POFILES) > $@
67
68install: all $(ROOTLINKS)
69
70$(ROOTLINKS): $(ROOTPROG)
71	$(RM) $@
72	$(LN) $(ROOTPROG) $@
73
74clean:
75	$(RM) $(OBJS)
76
77lint: lint_SRCS
78
79include ../Makefile.targ
80