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 5fb9f9b97Skupfer# Common Development and Distribution License (the "License"). 6fb9f9b97Skupfer# 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# 212e02daeeSRainer Orth 227c478bd9Sstevel@tonic-gate# 2387ab3622SRichard Lowe# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 2495c635efSGarrett D'Amore# Copyright 2014 Garrett D'Amore <garrett@damore.org> 250cc5983cSToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com> 2689d58ee0SChris Fraire# Copyright (c) 2016, Chris Fraire <cfraire@me.com>. 27d8e4595bSJohn Levon# Copyright 2019 Joyent, Inc. 28ca13eaa5SAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 29d203f834SJason King# Copyright 2021 Jason King 307c478bd9Sstevel@tonic-gate# 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateinclude ../Makefile.master 337c478bd9Sstevel@tonic-gate 34391889ecSAndy Fiddaman# Bootstrap problem: some utilities are pre-requisites for building everything 35391889ecSAndy Fiddaman# else: 36391889ecSAndy Fiddaman# - smatch - as it is a shadow compiler 37391889ecSAndy Fiddaman# - cw - as it is used to drive builds 38391889ecSAndy Fiddaman# - install.bin - being the 'install' target dependency 39391889ecSAndy Fiddaman# - ctf - being used to generate CTF data 40c0855578SRichard Lowe# 41391889ecSAndy Fiddaman# Anything built before 'install.bin' is present must override binary 42391889ecSAndy Fiddaman# installation rules in their makefiles. This includes the Makefile for 43391889ecSAndy Fiddaman# 'install.bin' itself. 447c478bd9Sstevel@tonic-gateBOOT_SUBDIRS= \ 451f5207b7SJohn Levon smatch \ 461f5207b7SJohn Levon .WAIT \ 47c0855578SRichard Lowe cw \ 48c0855578SRichard Lowe .WAIT \ 497079b4f8SToomas Soome install.bin \ 507079b4f8SToomas Soome .WAIT \ 511a90c98dSToomas Soome ctf \ 521a90c98dSToomas Soome yacc 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateCOMMON_SUBDIRS= \ 5523259b79Srotondo codesign \ 567c478bd9Sstevel@tonic-gate cscope-fast \ 577c478bd9Sstevel@tonic-gate env \ 58d203f834SJason King find_elf \ 597c478bd9Sstevel@tonic-gate findunref \ 6034c98957Smeem lintdump \ 6110d63b7dSRichard Lowe make \ 62e86c665fSToomas Soome makesoftcore \ 6310d63b7dSRichard Lowe ndrgen \ 6410d63b7dSRichard Lowe onbld \ 657c478bd9Sstevel@tonic-gate protocmp \ 667c478bd9Sstevel@tonic-gate protolist \ 6769b1fd3fSRichard Lowe scripts \ 68*9b9d39d2SRichard Lowe sgs \ 69*9b9d39d2SRichard Lowe svc 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate# 727c478bd9Sstevel@tonic-gate# special versions of commands for use only in build 737c478bd9Sstevel@tonic-gate# 74df8bdeb3SjohnzUNSHIPPED_SUBDIRS = \ 7569b1fd3fSRichard Lowe $(SGSMSG) \ 7669b1fd3fSRichard Lowe $(SGSLIBCONV) \ 7769b1fd3fSRichard Lowe $(SGSLIBELF) \ 7869b1fd3fSRichard Lowe $(SGSLIBLDDBG) \ 7969b1fd3fSRichard Lowe $(SGSLIBLD) \ 8069b1fd3fSRichard Lowe $(SGSLD) \ 81b8767451SRichard Lowe geniconvtbl \ 82503609a9SYuri Pankov localedef \ 83503609a9SYuri Pankov mandoc \ 842aeafac3SToomas Soome rpcgen \ 85503609a9SYuri Pankov tic \ 864b529e40SToomas Soome vtfontcvt \ 87503609a9SYuri Pankov zic 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gatei386_SUBDIRS= \ 907e3dbbacSRobert Mustacchi cpcgen \ 91ae115bc7Smrj elfextract \ 920cc5983cSToomas Soome mbh_patch \ 930cc5983cSToomas Soome btxld 947c478bd9Sstevel@tonic-gate 95df8bdeb3SjohnzSUBDIRS= \ 96df8bdeb3Sjohnz $($(MACH)_SUBDIRS) \ 97df8bdeb3Sjohnz $(COMMON_SUBDIRS) \ 98df8bdeb3Sjohnz $(UNSHIPPED_SUBDIRS) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gateinclude Makefile.tools 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gateROOTDIRS= \ 1032e02daeeSRainer Orth $(ROOTOPT) \ 1047c478bd9Sstevel@tonic-gate $(ROOTONBLD) \ 1057c478bd9Sstevel@tonic-gate $(ROOTONBLD)/bin \ 1067c478bd9Sstevel@tonic-gate $(ROOTONBLD)/bin/$(MACH) \ 1077a15b0ecSRichard Lowe $(ROOTONBLD)/bin/$(MACH64) \ 1087c478bd9Sstevel@tonic-gate $(ROOTONBLD)/lib \ 1097c478bd9Sstevel@tonic-gate $(ROOTONBLD)/lib/$(MACH) \ 11010d63b7dSRichard Lowe $(ROOTONBLD)/lib/$(MACH)/64 \ 11175ce41a5SAli Bahrami $(ROOTONBLD)/lib/perl \ 1127c478bd9Sstevel@tonic-gate $(ROOTONBLD)/env \ 1137c478bd9Sstevel@tonic-gate $(ROOTONBLD)/etc \ 11475ce41a5SAli Bahrami $(ROOTONBLD)/etc/exception_lists \ 11510d63b7dSRichard Lowe $(ROOTONBLD)/share \ 1167c478bd9Sstevel@tonic-gate $(ROOTONBLD)/man \ 1176cad8c54SRyan Zezeski $(ROOTONBLD)/man/man1onbld 1187c478bd9Sstevel@tonic-gate 11970143b9fSRichard LoweROOTDIRS += \ 120ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION) \ 121ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld \ 122ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/__pycache__ \ 123ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Checks \ 124ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Checks/__pycache__ \ 125ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Scm \ 126ca13eaa5SAndy Fiddaman $(ROOTONBLD)/lib/python$(PYTHON3_VERSION)/onbld/Scm/__pycache__ 127ca13eaa5SAndy Fiddaman 1287c478bd9Sstevel@tonic-gateall := TARGET= install 1297c478bd9Sstevel@tonic-gateinstall := TARGET= install 1307c478bd9Sstevel@tonic-gateclean := TARGET= clean 1317c478bd9Sstevel@tonic-gateclobber := TARGET= clobber 1327c478bd9Sstevel@tonic-gate_msg := TARGET= _msg 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate.KEEP_STATE: 1357c478bd9Sstevel@tonic-gate 136ead1f93eSLiane Praza# 137ead1f93eSLiane Praza# Only create directories in the tools proto area when doing an actual 138ead1f93eSLiane Praza# build, not a clean or clobber. 139ead1f93eSLiane Praza# 140ead1f93eSLiane PrazaDOROOTDIRS= $(ROOTDIRS) 141ead1f93eSLiane Prazaclobber:= DOROOTDIRS= 142ead1f93eSLiane Prazaclean:= DOROOTDIRS= 143ead1f93eSLiane Praza 14489d58ee0SChris Fraireclobber:= DOROOTONBLDLIBPY= 14589d58ee0SChris Fraireclean:= DOROOTONBLDLIBPY= 14689d58ee0SChris Fraire 14798157a70Sakolball install: $(SUBDIRS) 1487c478bd9Sstevel@tonic-gate 149df8bdeb3Sjohnzclean: $(SUBDIRS) 1507c478bd9Sstevel@tonic-gate 151df8bdeb3Sjohnzclobber: $(SUBDIRS) 1527c478bd9Sstevel@tonic-gate $(RM) -rf $(TOOLS_PROTO) 1537c478bd9Sstevel@tonic-gate 154391889ecSAndy Fiddamanbootstrap: $(BOOT_SUBDIRS) 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate_msg: $(MSGSUBDIRS) 1577c478bd9Sstevel@tonic-gate 15856ffda17SRichard Lowe.PARALLEL: $(SUBDIRS) 15998157a70Sakolb 16056ffda17SRichard Lowe$(SUBDIRS): $(BOOT_SUBDIRS) 16103113b45Sakolb 16289d58ee0SChris Fraire$(BOOT_SUBDIRS) $(SUBDIRS): $$(DOROOTDIRS) $$(DOROOTONBLDLIBPY) FRC 1637c478bd9Sstevel@tonic-gate @cd $@; pwd; $(MAKE) $(TARGET) 1647c478bd9Sstevel@tonic-gate 165c0855578SRichard Lowe# Assume we don't have the install.bin available yet 1667c478bd9Sstevel@tonic-gate$(ROOTDIRS): 167c0855578SRichard Lowe $(MKDIR) -p -m $(DIRMODE) $@ 168ead1f93eSLiane Praza 16987ab3622SRichard Lowe$(ROOTONBLDLIBPY): $(ROOTDIRS) 17070143b9fSRichard Lowe $(RM) -r $@; $(SYMLINK) python$(PYTHON3_VERSION) $@ 17187ab3622SRichard Lowe 172ead1f93eSLiane PrazaFRC: 173