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