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 55aefb655Srie# Common Development and Distribution License (the "License"). 65aefb655Srie# 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# 215aefb655Srie 225aefb655Srie# 2356deab07SRod Evans# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 245aefb655Srie# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.master 287c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/sgs/Makefile.var 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gateBUILDLOG= package_build.$(MACH).log 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gateMACHS:sh= if [ "$MACH" = "sparc" ]; \ 337c478bd9Sstevel@tonic-gate then echo "sparc sparcv9"; \ 347c478bd9Sstevel@tonic-gate elif [ "$MACH" = "i386" ]; \ 357c478bd9Sstevel@tonic-gate then echo "i386 amd64"; \ 367c478bd9Sstevel@tonic-gate else echo "unknown"; \ 377c478bd9Sstevel@tonic-gate fi 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateRDBDIRS= $(MACHS:%=../librtld_db/rdb_demo/%) 407c478bd9Sstevel@tonic-gateLDMAKEDIRS= $(MACHS:%=../libldmake/%) 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gateSUBDIRS1= ../libconv \ 447c478bd9Sstevel@tonic-gate .WAIT \ 457c478bd9Sstevel@tonic-gate ../libdl \ 467c478bd9Sstevel@tonic-gate .WAIT \ 477c478bd9Sstevel@tonic-gate ../libelf \ 487c478bd9Sstevel@tonic-gate .WAIT \ 497c478bd9Sstevel@tonic-gate ../liblddbg \ 507c478bd9Sstevel@tonic-gate ../librtld_db \ 517c478bd9Sstevel@tonic-gate .WAIT \ 527c478bd9Sstevel@tonic-gate ../librtld \ 537c478bd9Sstevel@tonic-gate ../libcrle 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gateSUBDIRS2 = ../rtld \ 567c478bd9Sstevel@tonic-gate ../rtld.4.x \ 577c478bd9Sstevel@tonic-gate ../libldstab \ 587c478bd9Sstevel@tonic-gate ../lari \ 597c478bd9Sstevel@tonic-gate ../ldprof \ 607c478bd9Sstevel@tonic-gate ../lddstub \ 617c478bd9Sstevel@tonic-gate $(LDMAKEDIRS) \ 627c478bd9Sstevel@tonic-gate ../0@0 \ 637c478bd9Sstevel@tonic-gate ../tools \ 647c478bd9Sstevel@tonic-gate $(RDBDIRS) 657c478bd9Sstevel@tonic-gate 663244bcaaSab196087 677c478bd9Sstevel@tonic-gate# 687c478bd9Sstevel@tonic-gate# Package dirs are directories which specifically 697c478bd9Sstevel@tonic-gate# have a 'package' target. This target is used to key 707c478bd9Sstevel@tonic-gate# off of whether a system build is performed 717c478bd9Sstevel@tonic-gate# or a SUNWonld build. 727c478bd9Sstevel@tonic-gate# 737c478bd9Sstevel@tonic-gatePKGDIRS= ../libcrle \ 747c478bd9Sstevel@tonic-gate ../libld \ 757c478bd9Sstevel@tonic-gate ../elfdump \ 76d29b2c44Sab196087 ../elfedit \ 77d29b2c44Sab196087 ../elfedit/modules \ 782722387fSrie ../elfwrap \ 797c478bd9Sstevel@tonic-gate ../crle \ 80ba4e3c84Sab196087 ../dump \ 817c478bd9Sstevel@tonic-gate ../lari \ 827c478bd9Sstevel@tonic-gate ../ld \ 837c478bd9Sstevel@tonic-gate ../ldd \ 847c478bd9Sstevel@tonic-gate ../ldprof \ 85ba4e3c84Sab196087 ../nm \ 867c478bd9Sstevel@tonic-gate ../mcs \ 877c478bd9Sstevel@tonic-gate ../moe \ 88d29b2c44Sab196087 ../pvs 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate$(SUBDIRS1) $(SUBDIRS2) := TARGET = install 917c478bd9Sstevel@tonic-gate$(PKGDIRS) := TARGET = package 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate../%: FRC 947c478bd9Sstevel@tonic-gate @ cd $@; pwd; $(MAKE) $(TARGET) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate.KEEP_STATE_FILE: .make.state.$(MACH) 977c478bd9Sstevel@tonic-gate.KEEP_STATE: 987c478bd9Sstevel@tonic-gate.PARALLEL: $(SUBDIRS1) $(PKGDIRS) $(SUBDIRS2) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gateall clean clobber install: FRC 1017c478bd9Sstevel@tonic-gate @ cd $(MACH); pwd; $(MAKE) $@ 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# 1047c478bd9Sstevel@tonic-gate# invoke `package' to build this package from scratch. It will 1057c478bd9Sstevel@tonic-gate# perform make install in the directories that contains components 1067c478bd9Sstevel@tonic-gate# that this package is dependent upon 1077c478bd9Sstevel@tonic-gate# 1087c478bd9Sstevel@tonic-gatepackage: FRC 1097c478bd9Sstevel@tonic-gate @/bin/time $(MAKE) package_build 2>&1 | tee $(BUILDLOG) 1107c478bd9Sstevel@tonic-gate @ echo "===BUILD COMPLETED checking for warnings...===" 1117c478bd9Sstevel@tonic-gate @ grep -i "warning:" $(BUILDLOG) | grep -v PSTAMP | cat 1127c478bd9Sstevel@tonic-gate @ echo "==================done=========================" 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gatepackage_build: package_dep .WAIT package_chkmsg .WAIT install 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gatepackage_chkmsg: FRC 1177c478bd9Sstevel@tonic-gate @ cd ..; pwd; $(MAKE) chkmsg 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gatepackage_dep: package_dep_ .WAIT $(SUBDIRS1) .WAIT \ 1207c478bd9Sstevel@tonic-gate $(PKGDIRS) .WAIT $(SUBDIRS2) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gatepackage_dep_: FRC 12346d4d531Srie @ cd ../tools; pwd; $(MAKE) proto && ./proto $(RELEASE) 12424da5b34Srie @ cd $(SRC)/common/mapfiles/gen ; pwd; $(MAKE) install 1257c478bd9Sstevel@tonic-gate @ cd $(SRC)/head; pwd; $(MAKE) \ 1267c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/dlfcn.h \ 1277c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/gelf.h \ 1287c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/libelf.h \ 1297c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/proc_service.h \ 1307c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/rtld_db.h \ 1317c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/link.h 1327c478bd9Sstevel@tonic-gate @ cd $(SRC)/lib/libproc; pwd; $(MAKE) install_h 1337c478bd9Sstevel@tonic-gate @ cd $(SRC)/uts/common/sys; pwd; $(MAKE) \ 1347c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/elf.h \ 1357c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/elf_386.h \ 1367c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/elf_SPARC.h \ 1377c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/elf_notes.h \ 1387c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/elf_amd64.h \ 1397c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/elftypes.h \ 1407c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/auxv.h \ 1417c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/auxv_SPARC.h \ 1427c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/auxv_386.h \ 143*9ac6ca4dSRod Evans $(ROOT)/usr/include/sys/avl.h \ 1447c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/link.h \ 145ba2be530Sab196087 $(ROOT)/usr/include/sys/machelf.h \ 1467c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/note.h \ 1477c478bd9Sstevel@tonic-gate $(ROOT)/usr/include/sys/systeminfo.h 1487c478bd9Sstevel@tonic-gate @ cd ../tools/$(MACH); pwd; $(MAKE) sgsmsg piglatin 1497c478bd9Sstevel@tonic-gate @ cd ..; pwd; $(MAKE) _msg_sgsmsg 1507c478bd9Sstevel@tonic-gate @ cd ..; pwd; $(MAKE) native-add 1517c478bd9Sstevel@tonic-gate @ cd ../libconv; pwd; $(MAKE) all 1527c478bd9Sstevel@tonic-gate @ cd ../link_audit; pwd; $(MAKE) package 1537c478bd9Sstevel@tonic-gate @ cd ../messages/$(MACH); pwd; $(MAKE) test 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gatelint: FRC 1567c478bd9Sstevel@tonic-gate $(MAKE) -f Makefile.lint lint 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gateFRC: 159