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 2008 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# ident "%Z%%M% %I% %E% SMI" 26# 27 28include $(SRC)/cmd/Makefile.cmd 29 30# Note: Why SUBDIRS-common isn't sorted alphabetically 31# 32# The items under SGS are not independent of each other. 33# They must be built in an order that ensures that 34# all dependencies of an item have been built before the 35# item itself. 36# 37SUBDIRS-common= libconv \ 38 .WAIT \ 39 libdl \ 40 libelf \ 41 liblddbg \ 42 .WAIT \ 43 libld \ 44 libldmake \ 45 libldstab \ 46 librtld \ 47 libcrle \ 48 sgsdemangler \ 49 .WAIT \ 50 0@0 \ 51 ld \ 52 ldd \ 53 lddstub \ 54 rtld \ 55 link_audit \ 56 .WAIT \ 57 librtld_db \ 58 ldprof \ 59 pvs \ 60 crle \ 61 ar \ 62 dump \ 63 elfdump \ 64 elfedit \ 65 elfwrap \ 66 error \ 67 gprof \ 68 lari \ 69 lex \ 70 lorder \ 71 m4 \ 72 mcs \ 73 moe \ 74 nm \ 75 prof \ 76 ranlib \ 77 size \ 78 symorder \ 79 tsort \ 80 unifdef \ 81 yacc 82 83SUBDIRS-i386= 84SUBDIRS-sparc= rtld.4.x 85 86SUBDIRS= $(SUBDIRS-common) $(SUBDIRS-$(MACH)) 87 88# Messaging support 89# 90POSUBDIRS= ar m4 nm \ 91 tsort yacc 92POFILE= sgs.po 93POFILES= $(POSUBDIRS:%=%/%.po) 94 95MSGSUBDIRS= ld ldd libld liblddbg \ 96 libldstab librtld rtld libelf \ 97 ldprof libcrle pvs elfdump \ 98 elfedit crle moe lari \ 99 librtld_db elfwrap 100 101MSGDIR= messages 102 103 104all := TARGET= all 105install := TARGET= install 106clean := TARGET= clean 107clobber := TARGET= clobber 108delete := TARGET= delete 109lint := TARGET= lint 110_msg := TARGET= catalog 111_msg_gettext := TARGET= catalog 112_msg_sgsmsg := TARGET= catalog 113chkmsg := TARGET= chkmsg 114 115 116.KEEP_STATE: 117 118.PARALLEL: $(SUBDIRS) 119 120all install: native-add .WAIT $(SUBDIRS) 121 122include $(SRC)/cmd/Makefile.targ 123 124# Messaging support 125# 126_msg: _msg_gettext _msg_sgsmsg 127 128_msg_gettext: $(MSGDOMAIN)/$(POFILE) 129 130_msg_sgsmsg: $(MSGDIR) 131 132$(MSGDOMAIN)/$(POFILE): \ 133 $(MSGDOMAIN) $(POFILE) 134 135$(POFILE): $(POSUBDIRS) 136 $(RM) $(POFILE) 137 cat $(POFILES) > $(POFILE) 138 139$(MSGDIR): $(MSGSUBDIRS) FRC 140 @ cd $@; pwd; $(MAKE) $(TARGET) 141 142chkmsg: libconv $(MSGSUBDIRS) FRC 143 144# built from lib/Makefile 145install_lib: FRC 146 @ cd lex; pwd; $(MAKE) $@ 147 @ cd yacc; pwd; $(MAKE) $@ 148 149lint: $(SUBDIRS) 150 151delete \ 152clean clobber: native-clobber .WAIT $(SUBDIRS) $(MSGDIR) 153 154$(SUBDIRS): FRC 155 @ cd $@; pwd; $(MAKE) $(TARGET) 156 157 158# Integration of ld and ld.so.1 in some developement cycles requires that both 159# of these modules be built using the new ld. This `native' target allows us 160# to build a local ld which will then be used to build the delivered version of 161# itself and ld.so.1. Once this new functionality appears in the standard ld 162# this target can be disabled. 163 164native-add: native-proto FRC 165 @ cd tools/$(MACH); pwd; $(MAKE) native 166 @ cd libconv/$(MACH); pwd; $(MAKE) 167 @ cd libelf/$(MACH); pwd; $(MAKE) native 168 @ cd liblddbg/$(MACH); pwd; $(MAKE) native 169 @ cd libldstab/$(MACH); pwd; $(MAKE) native 170 @ cd libld/$(MACH); pwd; $(MAKE) native 171 @ cd ld/$(MACH); pwd; $(MAKE) native 172 173native-clobber: 174 @ cd tools; pwd; $(MAKE) $(TARGET) 175 $(RM) -r proto/$(MACH) 176 177native-proto: 178 -@mkdir -p proto/$(MACH) 179 180FRC: 181 182# 183# Cross-reference customization: ignore the directories named by XRPRUNE, 184# and tweak the file globs slightly. 185# 186XRPRUNE= rtld.4.x packages abi 187XRADD= *.msg mapfile* llib-[a-z]* 188XRDEL= Makefile* kobj_* 189 190# 191# Establish a set of directories for xref to search. As there are duplicates 192# of things like headers, and only one file will be added to the xref database, 193# we want xref to list the source file. 194# 195XRDIRS= . \ 196 ../../head \ 197 ../../uts/common/krtld \ 198 ../../uts/common/sys \ 199 ../../uts/sparc/sys \ 200 ../../uts/sparc/krtld \ 201 ../../uts/intel/ia32/krtld \ 202 ../../uts/intel/amd64/krtld 203 204xref: FRC 205 @ $(RM) cscope.* 206 xref -p -x cscope 207