xref: /titanic_52/usr/src/cmd/sgs/ld/Makefile.targ (revision 70025d765b044c6d8594bb965a2247a61e991a99)
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#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright (c) 2001 by Sun Microsystems, Inc.
26# All rights reserved.
27
28all:		$(PROG)
29
30install \
31package:	all $(ROOTCCSBINPROG)
32
33%.o:		../common/%.c
34		$(COMPILE.c) $<
35		$(POST_PROCESS_O)
36
37$(PROG):	$(MAPFILE)
38
39$(ROOTCCSBIN)/%: %
40		$(INS.file)
41
42$(ROOTCCSBIN64)/%: %
43		$(INS.file)
44
45clean:
46		$(RM) $(OBJS) $(CLEANFILES)
47
48delete:
49		$(RM) $(PROG)
50
51lint:		$(LINTOUT32) $(SGSLINTOUT)
52
53include		$(SRC)/cmd/Makefile.targ
54include		$(SRC)/cmd/sgs/Makefile.targ
55
56# Special target for native builds (ie. when we need to build a version of ld
57# to build a version of ld :-).
58
59native:		$(SGSPROTO)/$(PROG)
60
61$(SGSPROTO)/$(PROG) \
62$(PROG):	$$(OBJS)
63		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
64		$(POST_PROCESS)
65
66# Derived source and header files (messaging).
67
68catalog:	$(BLTMESG)
69
70chkmsg:		$(SRCS)
71		sh $(CHKMSG) $(CHKMSGFLAGS) $(SRCS)
72
73$(BLTDEFS) + \
74$(BLTDATA) + \
75$(BLTMESG):	$(SGSMSGALL)
76		$(SGSMSG) $(SGSMSGFLAGS) $(SGSMSGALL)
77
78