1d29b2c44Sab196087# 2d29b2c44Sab196087# CDDL HEADER START 3d29b2c44Sab196087# 4d29b2c44Sab196087# The contents of this file are subject to the terms of the 5d29b2c44Sab196087# Common Development and Distribution License (the "License"). 6d29b2c44Sab196087# You may not use this file except in compliance with the License. 7d29b2c44Sab196087# 8d29b2c44Sab196087# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9d29b2c44Sab196087# or http://www.opensolaris.org/os/licensing. 10d29b2c44Sab196087# See the License for the specific language governing permissions 11d29b2c44Sab196087# and limitations under the License. 12d29b2c44Sab196087# 13d29b2c44Sab196087# When distributing Covered Code, include this CDDL HEADER in each 14d29b2c44Sab196087# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15d29b2c44Sab196087# If applicable, add the following below this CDDL HEADER, with the 16d29b2c44Sab196087# fields enclosed by brackets "[]" replaced with your own identifying 17d29b2c44Sab196087# information: Portions Copyright [yyyy] [name of copyright owner] 18d29b2c44Sab196087# 19d29b2c44Sab196087# CDDL HEADER END 20d29b2c44Sab196087# 21d29b2c44Sab196087# 22*1dd08564Sab196087# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23d29b2c44Sab196087# Use is subject to license terms. 24d29b2c44Sab196087# 25d29b2c44Sab196087# ident "%Z%%M% %I% %E% SMI" 26d29b2c44Sab196087# 27d29b2c44Sab196087 28d29b2c44Sab196087 29d29b2c44Sab196087$(PICDIR)/%.o: %.c 30d29b2c44Sab196087 $(COMPILE.c) $< -o $@ 31d29b2c44Sab196087 $(POST_PROCESS_O) 32d29b2c44Sab196087 33d29b2c44Sab196087$(PICDIR)/%.o: ../common/%.c 34d29b2c44Sab196087 $(COMPILE.c) $< -o $@ 35d29b2c44Sab196087 $(POST_PROCESS_O) 36d29b2c44Sab196087 37d29b2c44Sab196087$(PICDIR)/%32.o: ../common/%.c 38d29b2c44Sab196087 $(COMPILE.c) $< -o $@ 39d29b2c44Sab196087 $(POST_PROCESS_O) 40d29b2c44Sab196087 41d29b2c44Sab196087$(PICDIR)/%64.o: ../common/%.c 42d29b2c44Sab196087 $(COMPILE.c) -D_ELF64 $< -o $@ 43d29b2c44Sab196087 $(POST_PROCESS_O) 44d29b2c44Sab196087 45d29b2c44Sab196087 46d29b2c44Sab196087$(CAP_LIB): $(CAP_PICS) 47d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 48d29b2c44Sab196087 $(POST_PROCESS_SO) 49d29b2c44Sab196087 50d29b2c44Sab196087$(DYN_LIB): $(DYN_PICS) 51d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 52d29b2c44Sab196087 $(POST_PROCESS_SO) 53d29b2c44Sab196087 54d29b2c44Sab196087$(EHDR_LIB): $(EHDR_PICS) 55d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 56d29b2c44Sab196087 $(POST_PROCESS_SO) 57d29b2c44Sab196087 58d29b2c44Sab196087$(PHDR_LIB): $(PHDR_PICS) 59d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 60d29b2c44Sab196087 $(POST_PROCESS_SO) 61d29b2c44Sab196087 62d29b2c44Sab196087$(SHDR_LIB): $(SHDR_PICS) 63d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 64d29b2c44Sab196087 $(POST_PROCESS_SO) 65d29b2c44Sab196087 66ad212f6fSab196087$(STR_LIB): $(STR_PICS) 67ad212f6fSab196087 $(BUILD.SO) $(LLDFLAGS) 68ad212f6fSab196087 $(POST_PROCESS_SO) 69ad212f6fSab196087 70d29b2c44Sab196087$(SYM_LIB): $(SYM_PICS) 71d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 72d29b2c44Sab196087 $(POST_PROCESS_SO) 73d29b2c44Sab196087 74d29b2c44Sab196087$(SYMINFO_LIB): $(SYMINFO_PICS) 75d29b2c44Sab196087 $(BUILD.SO) $(LLDFLAGS) 76d29b2c44Sab196087 $(POST_PROCESS_SO) 77d29b2c44Sab196087 78d29b2c44Sab196087 79d29b2c44Sab196087$(ROOTELFEDITDIR): 80d29b2c44Sab196087 $(INS.dir) 81d29b2c44Sab196087 82d29b2c44Sab196087$(ROOTELFEDITDIR64): 83d29b2c44Sab196087 $(INS.dir) 84d29b2c44Sab196087 85d29b2c44Sab196087 86d29b2c44Sab196087$(ROOTELFEDITDIR)/%: % 87d29b2c44Sab196087 $(INS.file) 88d29b2c44Sab196087 89d29b2c44Sab196087$(ROOTELFEDITDIR64)/%: % 90d29b2c44Sab196087 $(INS.file) 91d29b2c44Sab196087 92d29b2c44Sab196087 93d29b2c44Sab196087../common/%.c: %_msg.h 94d29b2c44Sab196087 95d29b2c44Sab196087%_msg.h %_msg.c: $(SGSMSG) ../common/%.msg 96d29b2c44Sab196087 $(SGSMSG) $(SGSMSGFLAGS) -l -h $@ -d $@ \ 97d29b2c44Sab196087 -m $(SGSMSGDIR)/elfedit_$* -n $*_msg $< 98d29b2c44Sab196087 99d29b2c44Sab196087# This rule causes the message catalog file to be created under 100d29b2c44Sab196087# sgs/messages, but does not regenerate the C or header file for the module. 101d29b2c44Sab196087$(SGSMSGDIR)/elfedit_%: $(SGSMSG) ../common/%.msg 102d29b2c44Sab196087 $(SGSMSG) $(SGSMSGFLAGS) -l -m $(SGSMSGDIR)/elfedit_$* $< 103d29b2c44Sab196087 104d29b2c44Sab196087$(SGSMSG): 105d29b2c44Sab196087 @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog 106d29b2c44Sab196087 @ pwd 107d29b2c44Sab196087 108d29b2c44Sab196087catalog: $(SGSMSGDIR)/elfedit_cap \ 109d29b2c44Sab196087 $(SGSMSGDIR)/elfedit_dyn \ 110d29b2c44Sab196087 $(SGSMSGDIR)/elfedit_ehdr \ 111d29b2c44Sab196087 $(SGSMSGDIR)/elfedit_phdr \ 112d29b2c44Sab196087 $(SGSMSGDIR)/elfedit_shdr \ 113ad212f6fSab196087 $(SGSMSGDIR)/elfedit_str \ 114d29b2c44Sab196087 $(SGSMSGDIR)/elfedit_sym \ 115d29b2c44Sab196087 $(SGSMSGDIR)/elfedit_syminfo 116d29b2c44Sab196087 117d29b2c44Sab196087 118d29b2c44Sab196087chkmsg: $(SRCS) 119d29b2c44Sab196087 sh $(CHKMSG) -m ../common/cap.msg ../common/cap.c 120d29b2c44Sab196087 sh $(CHKMSG) -m ../common/dyn.msg ../common/dyn.c 121d29b2c44Sab196087 sh $(CHKMSG) -m ../common/ehdr.msg ../common/ehdr.c 122d29b2c44Sab196087 sh $(CHKMSG) -m ../common/phdr.msg ../common/phdr.c 123d29b2c44Sab196087 sh $(CHKMSG) -m ../common/shdr.msg ../common/shdr.c 124ad212f6fSab196087 sh $(CHKMSG) -m ../common/str.msg ../common/str.c 125d29b2c44Sab196087 sh $(CHKMSG) -m ../common/sym.msg ../common/sym.c 126d29b2c44Sab196087 sh $(CHKMSG) -m ../common/syminfo.msg ../common/syminfo.c 127d29b2c44Sab196087 128*1dd08564Sab196087 129*1dd08564Sab196087LINT_HDR= perl $(SGSTOOLS)/lint_hdr.pl 130*1dd08564Sab196087 131d29b2c44Sab196087lint: 132*1dd08564Sab196087 $(LINT_HDR) "elfedit modules" > $(LINTOUT) 133*1dd08564Sab196087 $(LINT_HDR) -s "cap.so" >> $(LINTOUT) 134*1dd08564Sab196087 $(LINT.c) ../common/cap.c 2>&1 | tee -a $(LINTOUT) 135*1dd08564Sab196087 136*1dd08564Sab196087 $(LINT_HDR) -s "dyn.so" >> $(LINTOUT) 137*1dd08564Sab196087 $(LINT.c) ../common/dyn.c 2>&1 | tee -a $(LINTOUT) 138*1dd08564Sab196087 139*1dd08564Sab196087 $(LINT_HDR) -s "ehdr.so" >> $(LINTOUT) 140*1dd08564Sab196087 $(LINT.c) ../common/ehdr.c 2>&1 | tee -a $(LINTOUT) 141*1dd08564Sab196087 142*1dd08564Sab196087 $(LINT_HDR) -s "phdr.so" >> $(LINTOUT) 143*1dd08564Sab196087 $(LINT.c) ../common/phdr.c 2>&1 | tee -a $(LINTOUT) 144*1dd08564Sab196087 145*1dd08564Sab196087 $(LINT_HDR) -s "shdr.so" >> $(LINTOUT) 146*1dd08564Sab196087 $(LINT.c) ../common/shdr.c 2>&1 | tee -a $(LINTOUT) 147*1dd08564Sab196087 148*1dd08564Sab196087 $(LINT_HDR) -s "str.so" >> $(LINTOUT) 149*1dd08564Sab196087 $(LINT.c) ../common/str.c 2>&1 | tee -a $(LINTOUT) 150*1dd08564Sab196087 151*1dd08564Sab196087 $(LINT_HDR) -s "sym.so" >> $(LINTOUT) 152*1dd08564Sab196087 $(LINT.c) ../common/sym.c 2>&1 | tee -a $(LINTOUT) 153*1dd08564Sab196087 154*1dd08564Sab196087 $(LINT_HDR) -s "syminfo.so" >> $(LINTOUT) 155*1dd08564Sab196087 $(LINT.c) ../common/syminfo.c 2>&1 | tee -a $(LINTOUT) 156d29b2c44Sab196087 157d29b2c44Sab196087include $(SRC)/lib/Makefile.targ 158