xref: /titanic_51/usr/src/cmd/sgs/Makefile (revision 0c44d0008f52b6a42b9c01d3b344661217520a68)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include		$(SRC)/cmd/Makefile.cmd
29
30SUBDIRS-common= libconv		\
31		libdl		\
32		libelf		\
33		liblddbg	\
34		.WAIT		\
35		libld		\
36		libldmake	\
37		libldstab	\
38		librtld		\
39		libcrle		\
40		sgsdemangler	\
41		.WAIT		\
42		0@0		\
43		ld		\
44		ldd		\
45		lddstub		\
46		rtld		\
47		link_audit	\
48		.WAIT		\
49		librtld_db	\
50		ldprof		\
51		pvs		\
52		crle		\
53		ar		\
54		dump		\
55		elfdump		\
56		error		\
57		gprof		\
58		lari		\
59		lex		\
60		lorder		\
61		m4		\
62		mapfiles	\
63		mcs		\
64		moe		\
65		nm		\
66		prof		\
67		ranlib		\
68		size		\
69		symorder	\
70		tsort		\
71		unifdef		\
72		yacc
73
74SUBDIRS-i386=
75SUBDIRS-sparc=	rtld.4.x
76
77SUBDIRS=	$(SUBDIRS-common) $(SUBDIRS-$(MACH))
78
79# Messaging support
80#
81POSUBDIRS=	ar		m4		nm \
82		tsort		yacc
83POFILE=		sgs.po
84POFILES=	$(POSUBDIRS:%=%/%.po)
85
86MSGSUBDIRS=	ld		ldd		libld		liblddbg \
87		libldstab	librtld		rtld		libelf \
88		ldprof		libcrle		pvs		elfdump	\
89		crle		moe		lari		librtld_db
90
91MSGDIR=		messages
92
93
94all :=		TARGET= all
95install :=	TARGET= install
96clean :=	TARGET= clean
97clobber :=	TARGET= clobber
98delete :=	TARGET= delete
99lint :=		TARGET= lint
100_msg :=		TARGET= catalog
101_msg_gettext :=	TARGET= catalog
102_msg_sgsmsg :=	TARGET= catalog
103chkmsg :=	TARGET= chkmsg
104
105
106.KEEP_STATE:
107
108.PARALLEL:	$(SUBDIRS)
109
110all install:	native-add .WAIT $(SUBDIRS)
111
112include		$(SRC)/cmd/Makefile.targ
113
114# Messaging support
115#
116_msg: _msg_gettext _msg_sgsmsg
117
118_msg_gettext: $(MSGDOMAIN)/$(POFILE)
119
120_msg_sgsmsg: $(MSGDIR)
121
122$(MSGDOMAIN)/$(POFILE): \
123		$(MSGDOMAIN) $(POFILE)
124
125$(POFILE):	$(POSUBDIRS)
126		$(RM) $(POFILE)
127		cat $(POFILES) > $(POFILE)
128
129$(MSGDIR):	$(MSGSUBDIRS) FRC
130		@ cd $@; pwd; $(MAKE) $(TARGET)
131
132chkmsg:		libconv $(MSGSUBDIRS) FRC
133
134# built from lib/Makefile
135install_lib:	FRC
136		@ cd lex; pwd; $(MAKE) $@
137		@ cd yacc; pwd; $(MAKE) $@
138
139lint:		$(SUBDIRS)
140
141delete \
142clean clobber:	native-clobber .WAIT $(SUBDIRS) $(MSGDIR)
143
144$(SUBDIRS):	FRC
145		@ cd $@; pwd; $(MAKE) $(TARGET)
146
147
148# Integration of ld and ld.so.1 in some developement cycles requires that both
149# of these modules be built using the new ld.  This `native' target allows us
150# to build a local ld which will then be used to build the delivered version of
151# itself and ld.so.1.  Once this new functionality appears in the standard ld
152# this target can be disabled.
153
154native-add:	native-proto FRC
155		@ cd tools/$(MACH); pwd; $(MAKE) native
156		@ cd libconv/$(MACH); pwd; $(MAKE)
157		@ cd libelf/$(MACH); pwd; $(MAKE) native
158		@ cd liblddbg/$(MACH); pwd; $(MAKE) native
159		@ cd libldstab/$(MACH); pwd; $(MAKE) native
160		@ cd libld/$(MACH); pwd; $(MAKE) native
161		@ cd ld/$(MACH); pwd; $(MAKE) native
162
163native-clobber:
164		@ cd tools; pwd; $(MAKE) $(TARGET)
165		$(RM) -r proto/$(MACH)
166
167native-proto:
168		-@mkdir -p proto/$(MACH)
169
170FRC:
171
172#
173# Cross-reference customization: ignore the directories named by XRPRUNE,
174# and tweak the file globs slightly.
175#
176XRPRUNE=	rtld.4.x spec packages abi
177XRADD=		*.msg mapfile* llib-[a-z]*
178XRDEL=		Makefile* kobj_*
179
180#
181# Establish a set of directories for xref to search.  As there are duplicates
182# of things like headers, and only one file will be added to the xref database,
183# we want xref to list the source file.
184#
185XRDIRS=		. \
186		../../head \
187		../../uts/common/krtld \
188		../../uts/common/sys \
189		../../uts/sparc/sys \
190		../../uts/sparc/krtld \
191		../../uts/intel/ia32/krtld \
192		../../uts/intel/amd64/krtld
193
194xref:		FRC
195		@ $(RM) cscope.*
196		xref -p -x cscope
197