xref: /titanic_44/usr/src/cmd/Makefile.targ (revision ea8dc4b6d2251b437950c0056bc626b311c73c27)
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# cmd/Makefile.targ
29# common target definitions for command builds
30#
31
32clobber: clean
33	-$(RM) $(PROG) $(CLOBBERFILES)
34
35lint_PROG:	$$(PROG).c
36	$(LINT.c) $(PROG).c $(LDLIBS)
37
38lint_SRCS:	$$(SRCS)
39	$(LINT.c) $(SRCS) $(LDLIBS)
40
41$(ROOTCMDDIR)/%: $(ROOTCMDDIR) %
42	$(INS.file)
43
44$(ROOTCMDDIR) $(ROOTCMDDIR64):
45	$(INS.dir)
46
47$(ROOTCMDDIR64)/%: $(ROOTCMDDIR64) %
48	$(INS.file)
49
50#
51# For message catalogue files
52#
53_msg: $(MSGDOMAIN) $(POFILE)
54	$(RM) $(MSGDOMAIN)/$(POFILE)
55	$(CP) $(POFILE) $(MSGDOMAIN)
56
57# the build of the $(DCFILE) should be defined locally
58# its .dc extension gets renamed to .po upon installation
59#
60_dc: $(DCMSGDOMAIN) $(DCFILE)
61	$(RM) $(DCMSGDOMAIN)/$(DCFILE)
62	$(CP) $(DCFILE) $(DCMSGDOMAIN)/$(DCFILE:.dc=.po)
63
64$(MSGDOMAIN) $(DCMSGDOMAIN):
65	$(INS.dir)
66