xref: /titanic_51/usr/src/cmd/prtdiag/Makefile.com (revision c2cb63342c63c60cee771d1af82f377e34aa1217)
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 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27
28include $(SRCDIR)/../Makefile.cmd
29include $(SRCDIR)/../../Makefile.psm
30
31PROG		= prtdiag
32OBJS		= main.o
33CLASS		= 32
34
35FILEMODE	= 2755
36DIRMODE		= 755
37OWNER		= root
38GROUP		= sys
39
40LINT_OBJS	= $(OBJS:%.o=%.ln)
41POFILE		= prtdiag.po
42POFILES		= $(OBJS:%.o=%.po)
43
44LIBPRTDIAG	= $(SRC)/lib/libprtdiag
45
46.PARALLEL: $(OBJS) $(LINT_OBJS)
47
48%.o: %.c
49	$(COMPILE.c) -o $@ $<
50	$(POST_PROCESS_O)
51
52%.o: $(SRCDIR)/%.c
53	$(COMPILE.c) -o $@ $<
54	$(POST_PROCESS_O)
55
56%.po: %.c
57	$(COMPILE.cpp) $<  > $<.i
58	$(BUILD.po)
59
60%.po: $(SRCDIR)/%.c
61	$(COMPILE.cpp) $<  > $<.i
62	$(BUILD.po)
63
64%.ln: %.c
65	$(LINT.c) -c $<
66
67%.ln: $(SRCDIR)/%.c
68	$(LINT.c) -c $<
69