17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate# with the License. 87c478bd9Sstevel@tonic-gate# 97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate# and limitations under the License. 137c478bd9Sstevel@tonic-gate# 147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate# 207c478bd9Sstevel@tonic-gate# CDDL HEADER END 217c478bd9Sstevel@tonic-gate# 227c478bd9Sstevel@tonic-gate# 23*dffec89cSrie# Copyright 2005 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gateSUBDIRS-common= libconv \ 327c478bd9Sstevel@tonic-gate .WAIT \ 337c478bd9Sstevel@tonic-gate libdl \ 347c478bd9Sstevel@tonic-gate .WAIT \ 357c478bd9Sstevel@tonic-gate libelf \ 367c478bd9Sstevel@tonic-gate .WAIT \ 377c478bd9Sstevel@tonic-gate liblddbg \ 387c478bd9Sstevel@tonic-gate .WAIT \ 397c478bd9Sstevel@tonic-gate libld \ 407c478bd9Sstevel@tonic-gate libldmake \ 417c478bd9Sstevel@tonic-gate libldstab \ 427c478bd9Sstevel@tonic-gate librtld \ 437c478bd9Sstevel@tonic-gate libcrle \ 447c478bd9Sstevel@tonic-gate sgsdemangler \ 457c478bd9Sstevel@tonic-gate .WAIT \ 467c478bd9Sstevel@tonic-gate 0@0 \ 477c478bd9Sstevel@tonic-gate ld \ 487c478bd9Sstevel@tonic-gate ldd \ 497c478bd9Sstevel@tonic-gate lddstub \ 507c478bd9Sstevel@tonic-gate rtld \ 517c478bd9Sstevel@tonic-gate link_audit \ 527c478bd9Sstevel@tonic-gate .WAIT \ 537c478bd9Sstevel@tonic-gate librtld_db \ 547c478bd9Sstevel@tonic-gate ldprof \ 557c478bd9Sstevel@tonic-gate pvs \ 567c478bd9Sstevel@tonic-gate crle \ 577c478bd9Sstevel@tonic-gate ar \ 587c478bd9Sstevel@tonic-gate dis \ 597c478bd9Sstevel@tonic-gate dump \ 607c478bd9Sstevel@tonic-gate elfdump \ 617c478bd9Sstevel@tonic-gate error \ 627c478bd9Sstevel@tonic-gate gprof \ 637c478bd9Sstevel@tonic-gate lari \ 647c478bd9Sstevel@tonic-gate lex \ 657c478bd9Sstevel@tonic-gate lorder \ 667c478bd9Sstevel@tonic-gate m4 \ 677c478bd9Sstevel@tonic-gate mapfiles \ 687c478bd9Sstevel@tonic-gate mcs \ 697c478bd9Sstevel@tonic-gate moe \ 707c478bd9Sstevel@tonic-gate nm \ 717c478bd9Sstevel@tonic-gate prof \ 727c478bd9Sstevel@tonic-gate ranlib \ 737c478bd9Sstevel@tonic-gate size \ 747c478bd9Sstevel@tonic-gate symorder \ 757c478bd9Sstevel@tonic-gate tsort \ 767c478bd9Sstevel@tonic-gate unifdef \ 777c478bd9Sstevel@tonic-gate yacc 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gateSUBDIRS-i386= 807c478bd9Sstevel@tonic-gateSUBDIRS-sparc= rtld.4.x 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gateSUBDIRS= $(SUBDIRS-common) $(SUBDIRS-$(MACH)) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate# Messaging support 857c478bd9Sstevel@tonic-gate# 867c478bd9Sstevel@tonic-gatePOSUBDIRS= ar m4 nm \ 877c478bd9Sstevel@tonic-gate tsort yacc 887c478bd9Sstevel@tonic-gatePOFILE= sgs.po 897c478bd9Sstevel@tonic-gatePOFILES= $(POSUBDIRS:%=%/%.po) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateMSGSUBDIRS= ld ldd libld liblddbg \ 927c478bd9Sstevel@tonic-gate libldstab librtld rtld libelf \ 937c478bd9Sstevel@tonic-gate ldprof libcrle pvs elfdump \ 947c478bd9Sstevel@tonic-gate crle moe lari librtld_db 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateMSGDIR= messages 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate 997c478bd9Sstevel@tonic-gateall := TARGET= all 1007c478bd9Sstevel@tonic-gateinstall := TARGET= install 1017c478bd9Sstevel@tonic-gateclean := TARGET= clean 1027c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 1037c478bd9Sstevel@tonic-gatedelete := TARGET= delete 1047c478bd9Sstevel@tonic-gatelint := TARGET= lint 1057c478bd9Sstevel@tonic-gate_msg := TARGET= catalog 1067c478bd9Sstevel@tonic-gate_msg_gettext := TARGET= catalog 1077c478bd9Sstevel@tonic-gate_msg_sgsmsg := TARGET= catalog 1087c478bd9Sstevel@tonic-gatechkmsg := TARGET= chkmsg 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate.KEEP_STATE: 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS) 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gateall install: native-add .WAIT $(SUBDIRS) 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.targ 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate# Messaging support 1207c478bd9Sstevel@tonic-gate# 1217c478bd9Sstevel@tonic-gate_msg: _msg_gettext _msg_sgsmsg 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate_msg_gettext: $(MSGDOMAIN)/$(POFILE) 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate_msg_sgsmsg: $(MSGDIR) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate$(MSGDOMAIN)/$(POFILE): \ 1287c478bd9Sstevel@tonic-gate $(MSGDOMAIN) $(POFILE) 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate$(POFILE): $(POSUBDIRS) 1317c478bd9Sstevel@tonic-gate $(RM) $(POFILE) 1327c478bd9Sstevel@tonic-gate cat $(POFILES) > $(POFILE) 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate$(MSGDIR): $(MSGSUBDIRS) FRC 1357c478bd9Sstevel@tonic-gate @ cd $@; pwd; $(MAKE) $(TARGET) 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gatechkmsg: libconv $(MSGSUBDIRS) FRC 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate# built from lib/Makefile 1407c478bd9Sstevel@tonic-gateinstall_lib: FRC 1417c478bd9Sstevel@tonic-gate @ cd lex; pwd; $(MAKE) $@ 1427c478bd9Sstevel@tonic-gate @ cd yacc; pwd; $(MAKE) $@ 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gatelint: $(SUBDIRS) 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gatedelete \ 1477c478bd9Sstevel@tonic-gateclean clobber: native-clobber .WAIT $(SUBDIRS) $(MSGDIR) 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1507c478bd9Sstevel@tonic-gate @ cd $@; pwd; $(MAKE) $(TARGET) 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate# Integration of ld and ld.so.1 in some developement cycles requires that both 1547c478bd9Sstevel@tonic-gate# of these modules be built using the new ld. This `native' target allows us 1557c478bd9Sstevel@tonic-gate# to build a local ld which will then be used to build the delivered version of 1567c478bd9Sstevel@tonic-gate# itself and ld.so.1. Once this new functionality appears in the standard ld 1577c478bd9Sstevel@tonic-gate# this target can be disabled. 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gatenative-add: native-proto FRC 1607c478bd9Sstevel@tonic-gate @ cd tools/$(MACH); pwd; $(MAKE) native 1617c478bd9Sstevel@tonic-gate @ cd libconv/$(MACH); pwd; $(MAKE) 1627c478bd9Sstevel@tonic-gate @ cd libelf/$(MACH); pwd; $(MAKE) native 1637c478bd9Sstevel@tonic-gate @ cd liblddbg/$(MACH); pwd; $(MAKE) native 1647c478bd9Sstevel@tonic-gate @ cd libldstab/$(MACH); pwd; $(MAKE) native 1657c478bd9Sstevel@tonic-gate @ cd libld/$(MACH); pwd; $(MAKE) native 1667c478bd9Sstevel@tonic-gate @ cd ld/$(MACH); pwd; $(MAKE) native 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gatenative-clobber: 1697c478bd9Sstevel@tonic-gate @ cd tools; pwd; $(MAKE) $(TARGET) 1707c478bd9Sstevel@tonic-gate $(RM) -r proto/$(MACH) 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gatenative-proto: 1737c478bd9Sstevel@tonic-gate -@mkdir -p proto/$(MACH) 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gateFRC: 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate# 1787c478bd9Sstevel@tonic-gate# Cross-reference customization: ignore the directories named by XRPRUNE, 1797c478bd9Sstevel@tonic-gate# and tweak the file globs slightly. 1807c478bd9Sstevel@tonic-gate# 1817c478bd9Sstevel@tonic-gateXRPRUNE= rtld.4.x spec packages abi 182*dffec89cSrieXRADD= *.msg mapfile* llib-[a-z]* 1837c478bd9Sstevel@tonic-gateXRDEL= Makefile* kobj_* 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate# 1867c478bd9Sstevel@tonic-gate# Establish a set of directories for xref to search. As there are duplicates 1877c478bd9Sstevel@tonic-gate# of things like headers, and only one file will be added to the xref database, 1887c478bd9Sstevel@tonic-gate# we want xref to list the source file. 1897c478bd9Sstevel@tonic-gate# 1907c478bd9Sstevel@tonic-gateXRDIRS= . \ 1917c478bd9Sstevel@tonic-gate ../../head \ 1927c478bd9Sstevel@tonic-gate ../../uts/common/krtld \ 1937c478bd9Sstevel@tonic-gate ../../uts/common/sys \ 1947c478bd9Sstevel@tonic-gate ../../uts/sparc/sys \ 1957c478bd9Sstevel@tonic-gate ../../uts/sparc/krtld \ 1967c478bd9Sstevel@tonic-gate ../../uts/intel/ia32/krtld \ 1977c478bd9Sstevel@tonic-gate ../../uts/intel/amd64/krtld 1987c478bd9Sstevel@tonic-gate 1997c478bd9Sstevel@tonic-gatexref: FRC 2007c478bd9Sstevel@tonic-gate @ $(RM) cscope.* 2017c478bd9Sstevel@tonic-gate xref -p -x cscope 202