xref: /titanic_50/usr/src/cmd/pgrep/Makefile (revision 753a6d457b330b1b29b2d3eefcd0831116ce950d)
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
28PROG = pgrep
29PKILLFILE = pkill
30
31ROOTLINKS = $(ROOTBIN)/$(PKILLFILE)
32
33OBJS = pgrep.o idtab.o psexp.o
34SRCS = $(OBJS:.o=.c)
35POFILES = $(OBJS:.o=.po)
36lint := LINTFLAGS = -ux
37
38include ../Makefile.cmd
39
40CLOBBERFILES += $(PKILLFILE)
41CFLAGS += $(CCVERBOSE)
42LDLIBS += -luutil -lproject -lcontract
43
44POFILE = ppgrep.po
45XGETFLAGS = -a -x pgrep.xcl
46
47FILEMODE = 0555
48GROUP = bin
49
50.KEEP_STATE:
51
52all: $(PROG) $(PKILLFILE)
53
54$(PKILLFILE): $(PROG)
55	$(RM) $@
56	$(LN) $(PROG) $@
57
58$(PROG): $(OBJS)
59	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
60	$(POST_PROCESS)
61
62$(POFILE):	$(POFILES)
63	$(RM) $@; cat $(POFILES) > $@
64
65install: all $(ROOTLINKS)
66
67$(ROOTLINKS): $(ROOTPROG)
68	$(RM) $@
69	$(LN) $(ROOTPROG) $@
70
71clean:
72	$(RM) $(OBJS)
73
74lint: lint_SRCS
75
76include ../Makefile.targ
77