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 (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 23# Copyright 2020 Joyent, Inc. 24# 25# Definitions common to tool source. 26# 27include $(SRC)/Makefile.master 28 29FILEMODE= 0555 30 31TOOLS= $(SRC)/tools 32TOOLS_PROTO= $(TOOLS)/proto/root_$(MACH)-nd 33ROOTOPT= $(TOOLS_PROTO)/opt 34ROOTONBLD= $(ROOTOPT)/onbld 35ROOTONBLDBIN= $(ROOTONBLD)/bin 36ROOTONBLDBINMACH= $(ROOTONBLD)/bin/$(MACH) 37ROOTONBLDETC= $(ROOTONBLD)/etc 38ROOTONBLDLIB= $(ROOTONBLD)/lib 39ROOTONBLDLIBMACH= $(ROOTONBLD)/lib/$(MACH) 40ROOTONBLDLIBMACH64= $(ROOTONBLD)/lib/$(MACH)/64 41ROOTONBLDLIBPERL= $(ROOTONBLD)/lib/perl 42ROOTONBLDLIBPY= $(ROOTONBLD)/lib/python 43ROOTONBLDENV= $(ROOTONBLD)/env 44ROOTONBLDGK= $(ROOTONBLD)/gk 45ROOTONBLDMAN= $(ROOTONBLD)/man 46ROOTONBLDMAN1ONBLD= $(ROOTONBLD)/man/man1onbld 47ROOTONBLDETCABI= $(ROOTONBLD)/etc/abi 48ROOTONBLDETCEXCEPT= $(ROOTONBLD)/etc/exception_lists 49ROOTONBLDSHARE= $(ROOTONBLD)/share 50 51CPPFLAGS= -D_TS_ERRNO 52ELFSIGN_O= $(TRUE) 53LDLIBS= 54LDFLAGS= $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \ 55 $(MAPFILE.PGA:%=-M%) 56 57ROOTONBLDPROG= $(PROG:%=$(ROOTONBLDBIN)/%) 58ROOTONBLDSCRIPTS= $(SCRIPTS:%=$(ROOTONBLDBIN)/%) 59ROOTONBLDMACHPROG= $(PROG:%=$(ROOTONBLDBINMACH)/%) 60ROOTONBLDSHFILES= $(SHFILES:%=$(ROOTONBLDBIN)/%) 61ROOTONBLDMAKEFILES= $(MAKEFILES:%=$(ROOTONBLDBIN)/%) 62ROOTONBLDMACHSHFILES= $(SHFILES:%=$(ROOTONBLDBINMACH)/%) 63ROOTONBLDMACHBINARIES= $(BINARIES:%=$(ROOTONBLDBINMACH)/%) 64ROOTONBLDETCFILES= $(ETCFILES:%=$(ROOTONBLDETC)/%) 65ROOTONBLDENVFILES= $(ENVFILES:%=$(ROOTONBLDENV)/%) 66ROOTONBLDGKFILES= $(GKFILES:%=$(ROOTONBLDGK)/.%) 67ROOTONBLDGKSHFILES= $(SHFILES:%=$(ROOTONBLDGK)/%) 68ROOTONBLDPERLFILES= $(PERLFILES:%=$(ROOTONBLDBIN)/%) 69ROOTONBLDPERLMODULES= $(PERLMODULES:%=$(ROOTONBLDLIBPERL)/%) 70ROOTONBLDPYFILES= $(PYFILES:%=$(ROOTONBLDBIN)/%) 71ROOTONBLDMAN1ONBLDFILES=$(MAN1ONBLDFILES:%=$(ROOTONBLDMAN1ONBLD)/%) 72ROOTONBLDABIAUDITFILES= $(ABI_AUDITFILES:%=$(ROOTONBLDETCABI)/%) 73ROOTONBLDEXCEPTFILES= $(EXCEPTFILES:%=$(ROOTONBLDETCEXCEPT)/%) 74 75# Break a chicken-and-egg dependency cycle for the tools build 76SCCSCHECK=@echo would sccscheck 77 78$(ROOTONBLDETCABI)/%: % 79 $(INS.file) 80 81$(ROOTONBLDETCEXCEPT)/%: $(CODEMGR_WS)/exception_lists/% 82 $(INS.file) 83 84$(ROOTONBLDBIN)/%: % 85 $(INS.file) 86 87$(ROOTONBLDBINMACH)/%: % 88 $(INS.file) 89 90$(ROOTONBLDETC)/%: % 91 $(INS.file) 92 93$(ROOTONBLDLIBPERL)/%: % 94 $(INS.file) 95 96$(ROOTONBLDMAN1ONBLD)/%: % 97 $(INS.file) 98 99$(ROOTONBLDENV)/%: % 100 $(INS.file) 101 102$(ROOTONBLDGK)/.%: % 103 $(INS.rename) 104 105$(ROOTONBLDGK)/%: % 106 $(INS.file) 107