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