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 5dc0093f4Seschrock# Common Development and Distribution License (the "License"). 6dc0093f4Seschrock# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22ba7866cdSAli Bahrami# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. 23396aa620SAndrew Stormont# Copyright 2016 RackTop Systems. 249e01f109SJason King# Copyright 2017 Joyent, Inc. 25cf9a187cSAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd 297c478bd9Sstevel@tonic-gate 301dd08564Sab196087# Note: Why SUBDIRS-common isn't sorted alphabetically 311dd08564Sab196087# 321dd08564Sab196087# The items under SGS are not independent of each other. 331dd08564Sab196087# They must be built in an order that ensures that 341dd08564Sab196087# all dependencies of an item have been built before the 351dd08564Sab196087# item itself. 361dd08564Sab196087# 377c478bd9Sstevel@tonic-gateSUBDIRS-common= libconv \ 38f808c858Sraf .WAIT \ 397c478bd9Sstevel@tonic-gate libdl \ 407c478bd9Sstevel@tonic-gate libelf \ 417c478bd9Sstevel@tonic-gate liblddbg \ 427c478bd9Sstevel@tonic-gate .WAIT \ 437c478bd9Sstevel@tonic-gate libld \ 447c478bd9Sstevel@tonic-gate libldmake \ 457c478bd9Sstevel@tonic-gate libldstab \ 467c478bd9Sstevel@tonic-gate librtld \ 477c478bd9Sstevel@tonic-gate libcrle \ 487c478bd9Sstevel@tonic-gate .WAIT \ 497c478bd9Sstevel@tonic-gate 0@0 \ 507c478bd9Sstevel@tonic-gate ld \ 517c478bd9Sstevel@tonic-gate ldd \ 527c478bd9Sstevel@tonic-gate lddstub \ 537c478bd9Sstevel@tonic-gate rtld \ 547c478bd9Sstevel@tonic-gate link_audit \ 557c478bd9Sstevel@tonic-gate .WAIT \ 567c478bd9Sstevel@tonic-gate librtld_db \ 577c478bd9Sstevel@tonic-gate ldprof \ 587c478bd9Sstevel@tonic-gate pvs \ 597c478bd9Sstevel@tonic-gate crle \ 607c478bd9Sstevel@tonic-gate ar \ 617c478bd9Sstevel@tonic-gate dump \ 627c478bd9Sstevel@tonic-gate elfdump \ 63d29b2c44Sab196087 elfedit \ 642722387fSrie elfwrap \ 657c478bd9Sstevel@tonic-gate error \ 667c478bd9Sstevel@tonic-gate gprof \ 677c478bd9Sstevel@tonic-gate lari \ 687c478bd9Sstevel@tonic-gate lex \ 697c478bd9Sstevel@tonic-gate lorder \ 707c478bd9Sstevel@tonic-gate m4 \ 717c478bd9Sstevel@tonic-gate mcs \ 727c478bd9Sstevel@tonic-gate moe \ 737c478bd9Sstevel@tonic-gate nm \ 747c478bd9Sstevel@tonic-gate prof \ 757c478bd9Sstevel@tonic-gate ranlib \ 767c478bd9Sstevel@tonic-gate size \ 777c478bd9Sstevel@tonic-gate symorder \ 787c478bd9Sstevel@tonic-gate tsort \ 797c478bd9Sstevel@tonic-gate unifdef \ 80*d9328cd4SRobert Mustacchi yacc \ 81*d9328cd4SRobert Mustacchi .WAIT \ 82*d9328cd4SRobert Mustacchi demo_rdb 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateSUBDIRS-i386= 857c478bd9Sstevel@tonic-gateSUBDIRS-sparc= rtld.4.x 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gateSUBDIRS= $(SUBDIRS-common) $(SUBDIRS-$(MACH)) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate# Messaging support 907c478bd9Sstevel@tonic-gate# 91ba7866cdSAli BahramiPOSUBDIRS= m4 nm tsort yacc 927c478bd9Sstevel@tonic-gatePOFILE= sgs.po 937c478bd9Sstevel@tonic-gatePOFILES= $(POSUBDIRS:%=%/%.po) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gateMSGSUBDIRS= ld ldd libld liblddbg \ 967c478bd9Sstevel@tonic-gate libldstab librtld rtld libelf \ 977c478bd9Sstevel@tonic-gate ldprof libcrle pvs elfdump \ 98d29b2c44Sab196087 elfedit crle moe lari \ 99ba7866cdSAli Bahrami librtld_db elfwrap ar 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateMSGDIR= messages 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gateall := TARGET= all 1057c478bd9Sstevel@tonic-gateinstall := TARGET= install 1067c478bd9Sstevel@tonic-gateclean := TARGET= clean 1077c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 1087c478bd9Sstevel@tonic-gatedelete := TARGET= delete 1097c478bd9Sstevel@tonic-gatelint := TARGET= lint 1107c478bd9Sstevel@tonic-gate_msg := TARGET= catalog 1117c478bd9Sstevel@tonic-gate_msg_gettext := TARGET= catalog 1127c478bd9Sstevel@tonic-gate_msg_sgsmsg := TARGET= catalog 1137c478bd9Sstevel@tonic-gatechkmsg := TARGET= chkmsg 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate.KEEP_STATE: 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS) 1197c478bd9Sstevel@tonic-gate 12069b1fd3fSRichard Loweall install: $(SUBDIRS) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.targ 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate# Messaging support 1257c478bd9Sstevel@tonic-gate# 1267c478bd9Sstevel@tonic-gate_msg: _msg_gettext _msg_sgsmsg 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate_msg_gettext: $(MSGDOMAIN)/$(POFILE) 1297c478bd9Sstevel@tonic-gate 13069b1fd3fSRichard Lowe_msg_sgsmsg: $(MSGDIR) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate$(MSGDOMAIN)/$(POFILE): \ 1337c478bd9Sstevel@tonic-gate $(MSGDOMAIN) $(POFILE) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate$(POFILE): $(POSUBDIRS) 1367c478bd9Sstevel@tonic-gate $(RM) $(POFILE) 1377c478bd9Sstevel@tonic-gate cat $(POFILES) > $(POFILE) 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate$(MSGDIR): $(MSGSUBDIRS) FRC 1407c478bd9Sstevel@tonic-gate @ cd $@; pwd; $(MAKE) $(TARGET) 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gatechkmsg: libconv $(MSGSUBDIRS) FRC 1437c478bd9Sstevel@tonic-gate 1449c5a3148SRichard Lowecheck: chkmsg 1459c5a3148SRichard Lowe 1467c478bd9Sstevel@tonic-gate# built from lib/Makefile 1477c478bd9Sstevel@tonic-gateinstall_lib: FRC 1487c478bd9Sstevel@tonic-gate @ cd lex; pwd; $(MAKE) $@ 1497c478bd9Sstevel@tonic-gate @ cd yacc; pwd; $(MAKE) $@ 1507c478bd9Sstevel@tonic-gate 151cf9a187cSAndy Fiddamanlint: 1527c478bd9Sstevel@tonic-gate 15369b1fd3fSRichard Lowedelete clean clobber: $(SUBDIRS) $(MSGDIR) 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gate$(SUBDIRS): FRC 1567c478bd9Sstevel@tonic-gate @ cd $@; pwd; $(MAKE) $(TARGET) 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gateFRC: 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate# 1617c478bd9Sstevel@tonic-gate# Cross-reference customization: ignore the directories named by XRPRUNE, 1627c478bd9Sstevel@tonic-gate# and tweak the file globs slightly. 1637c478bd9Sstevel@tonic-gate# 16469b1fd3fSRichard LoweXRPRUNE= rtld.4.x abi 165cf9a187cSAndy FiddamanXRADD= *.msg mapfile* 1667c478bd9Sstevel@tonic-gateXRDEL= Makefile* kobj_* 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate# 1697c478bd9Sstevel@tonic-gate# Establish a set of directories for xref to search. As there are duplicates 1707c478bd9Sstevel@tonic-gate# of things like headers, and only one file will be added to the xref database, 1717c478bd9Sstevel@tonic-gate# we want xref to list the source file. 1727c478bd9Sstevel@tonic-gate# 1737c478bd9Sstevel@tonic-gateXRDIRS= . \ 17408278a5eSRod Evans ../../common/elfcap \ 1757c478bd9Sstevel@tonic-gate ../../head \ 1767c478bd9Sstevel@tonic-gate ../../uts/common/krtld \ 1777c478bd9Sstevel@tonic-gate ../../uts/common/sys \ 1787c478bd9Sstevel@tonic-gate ../../uts/sparc/sys \ 1797c478bd9Sstevel@tonic-gate ../../uts/sparc/krtld \ 1807c478bd9Sstevel@tonic-gate ../../uts/intel/ia32/krtld \ 1817c478bd9Sstevel@tonic-gate ../../uts/intel/amd64/krtld 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gatexref: FRC 1847c478bd9Sstevel@tonic-gate @ $(RM) cscope.* 1857c478bd9Sstevel@tonic-gate xref -p -x cscope 186