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# 23# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28 29include $(SRC)/Makefile.master 30include $(SRC)/cmd/sgs/Makefile.var 31 32BUILDLOG= package_build.$(MACH).log 33 34MACHS:sh= if [ "$MACH" = "sparc" ]; \ 35 then echo "sparc sparcv9"; \ 36 elif [ "$MACH" = "i386" ]; \ 37 then echo "i386 amd64"; \ 38 else echo "unknown"; \ 39 fi 40 41RDBDIRS= $(MACHS:%=../librtld_db/rdb_demo/%) 42LDMAKEDIRS= $(MACHS:%=../libldmake/%) 43 44 45SUBDIRS1= ../libconv \ 46 .WAIT \ 47 ../libdl \ 48 .WAIT \ 49 ../libelf \ 50 .WAIT \ 51 ../liblddbg \ 52 ../librtld_db \ 53 .WAIT \ 54 ../librtld \ 55 ../libcrle 56 57SUBDIRS2 = ../rtld \ 58 ../rtld.4.x \ 59 ../libldstab \ 60 ../lari \ 61 ../ldprof \ 62 ../lddstub \ 63 $(LDMAKEDIRS) \ 64 ../0@0 \ 65 ../tools \ 66 $(RDBDIRS) 67 68# 69# Package dirs are directories which specifically 70# have a 'package' target. This target is used to key 71# off of whether a system build is performed 72# or a SUNWonld build. 73# 74PKGDIRS= ../libcrle \ 75 ../libld \ 76 ../elfdump \ 77 ../crle \ 78 ../lari \ 79 ../ld \ 80 ../ldd \ 81 ../ldprof \ 82 ../mcs \ 83 ../moe \ 84 ../pvs 85 86$(SUBDIRS1) $(SUBDIRS2) := TARGET = install 87$(PKGDIRS) := TARGET = package 88 89 90M32:sh= if [ "$MACH" = "sparc" ]; \ 91 then echo sparc; \ 92 elif [ "$MACH" = "i386" ]; \ 93 then echo "$(VAR_I386_ARCH)"; \ 94 else \ 95 echo "unknown"; \ 96 fi 97 98../%: FRC 99 @ cd $@; pwd; $(MAKE) $(TARGET) 100 101.KEEP_STATE_FILE: .make.state.$(MACH) 102.KEEP_STATE: 103.PARALLEL: $(SUBDIRS1) $(PKGDIRS) $(SUBDIRS2) 104 105all clean clobber install: FRC 106 @ cd $(MACH); pwd; $(MAKE) $@ 107 108# 109# invoke `package' to build this package from scratch. It will 110# perform make install in the directories that contains components 111# that this package is dependent upon 112# 113package: FRC 114 @/bin/time $(MAKE) package_build 2>&1 | tee $(BUILDLOG) 115 @ echo "===BUILD COMPLETED checking for warnings...===" 116 @ grep -i "warning:" $(BUILDLOG) | grep -v PSTAMP | cat 117 @ echo "==================done=========================" 118 119package_build: package_dep .WAIT package_chkmsg .WAIT install 120 121package_chkmsg: FRC 122 @ cd ..; pwd; $(MAKE) chkmsg 123 124package_dep: package_dep_ .WAIT $(SUBDIRS1) .WAIT \ 125 $(PKGDIRS) .WAIT $(SUBDIRS2) 126 127package_dep_: FRC 128 @ cd ../tools; pwd; $(MAKE) proto && ./proto 129 @ cd $(SRC)/head; pwd; $(MAKE) \ 130 $(ROOT)/usr/include/dlfcn.h \ 131 $(ROOT)/usr/include/gelf.h \ 132 $(ROOT)/usr/include/libelf.h \ 133 $(ROOT)/usr/include/proc_service.h \ 134 $(ROOT)/usr/include/rtld_db.h \ 135 $(ROOT)/usr/include/link.h 136 @ cd $(SRC)/lib/libproc; pwd; $(MAKE) install_h 137 @ cd $(SRC)/uts/common/sys; pwd; $(MAKE) \ 138 $(ROOT)/usr/include/sys/elf.h \ 139 $(ROOT)/usr/include/sys/elf_386.h \ 140 $(ROOT)/usr/include/sys/elf_SPARC.h \ 141 $(ROOT)/usr/include/sys/elf_notes.h \ 142 $(ROOT)/usr/include/sys/elf_amd64.h \ 143 $(ROOT)/usr/include/sys/elftypes.h \ 144 $(ROOT)/usr/include/sys/auxv.h \ 145 $(ROOT)/usr/include/sys/auxv_SPARC.h \ 146 $(ROOT)/usr/include/sys/auxv_386.h \ 147 $(ROOT)/usr/include/sys/link.h \ 148 $(ROOT)/usr/include/sys/note.h \ 149 $(ROOT)/usr/include/sys/systeminfo.h 150 @ cd $(SRC)/uts/$(M32)/sys; pwd; $(MAKE) \ 151 $(ROOT)/usr/include/sys/machelf.h 152 @ cd ../tools/$(MACH); pwd; $(MAKE) sgsmsg piglatin 153 @ cd ..; pwd; $(MAKE) _msg_sgsmsg 154 @ cd ..; pwd; $(MAKE) native-add 155 @ cd ../libconv; pwd; $(MAKE) all 156 @ cd ../link_audit; pwd; $(MAKE) package 157 @ cd ../messages/$(MACH); pwd; $(MAKE) test 158 @ cd ../sgsdemangler; pwd; $(MAKE) all 159 160lint: FRC 161 $(MAKE) -f Makefile.lint lint 162 163FRC: 164