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 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 26 # 27 28 29 $(PICDIR)/%.o: %.c 30 $(COMPILE.c) $< -o $@ 31 $(POST_PROCESS_O) 32 33 $(PICDIR)/%.o: ../common/%.c 34 $(COMPILE.c) $< -o $@ 35 $(POST_PROCESS_O) 36 37 $(PICDIR)/%32.o: ../common/%.c 38 $(COMPILE.c) $< -o $@ 39 $(POST_PROCESS_O) 40 41 $(PICDIR)/%64.o: ../common/%.c 42 $(COMPILE.c) -D_ELF64 $< -o $@ 43 $(POST_PROCESS_O) 44 45 46 $(CAP_LIB): $(CAP_PICS) 47 $(BUILD.SO) $(LLDFLAGS) 48 $(POST_PROCESS_SO) 49 50 $(DYN_LIB): $(DYN_PICS) 51 $(BUILD.SO) $(LLDFLAGS) 52 $(POST_PROCESS_SO) 53 54 $(EHDR_LIB): $(EHDR_PICS) 55 $(BUILD.SO) $(LLDFLAGS) 56 $(POST_PROCESS_SO) 57 58 $(PHDR_LIB): $(PHDR_PICS) 59 $(BUILD.SO) $(LLDFLAGS) 60 $(POST_PROCESS_SO) 61 62 $(SHDR_LIB): $(SHDR_PICS) 63 $(BUILD.SO) $(LLDFLAGS) 64 $(POST_PROCESS_SO) 65 66 $(STR_LIB): $(STR_PICS) 67 $(BUILD.SO) $(LLDFLAGS) 68 $(POST_PROCESS_SO) 69 70 $(SYM_LIB): $(SYM_PICS) 71 $(BUILD.SO) $(LLDFLAGS) 72 $(POST_PROCESS_SO) 73 74 $(SYMINFO_LIB): $(SYMINFO_PICS) 75 $(BUILD.SO) $(LLDFLAGS) 76 $(POST_PROCESS_SO) 77 78 79 $(ROOTELFEDITDIR): 80 $(INS.dir) 81 82 $(ROOTELFEDITDIR64): 83 $(INS.dir) 84 85 86 $(ROOTELFEDITDIR)/%: % 87 $(INS.file) 88 89 $(ROOTELFEDITDIR64)/%: % 90 $(INS.file) 91 92 93 ../common/%.c: %_msg.h 94 95 %_msg.h %_msg.c: $(SGSMSG) ../common/%.msg 96 $(SGSMSG) $(SGSMSGFLAGS) -l -h $@ -d $@ \ 97 -m $(SGSMSGDIR)/elfedit_$* -n $*_msg $< 98 99 # This rule causes the message catalog file to be created under 100 # sgs/messages, but does not regenerate the C or header file for the module. 101 $(SGSMSGDIR)/elfedit_%: $(SGSMSG) ../common/%.msg 102 $(SGSMSG) $(SGSMSGFLAGS) -l -m $(SGSMSGDIR)/elfedit_$* $< 103 104 $(SGSMSG): 105 @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog 106 @ pwd 107 108 catalog: $(SGSMSGDIR)/elfedit_cap \ 109 $(SGSMSGDIR)/elfedit_dyn \ 110 $(SGSMSGDIR)/elfedit_ehdr \ 111 $(SGSMSGDIR)/elfedit_phdr \ 112 $(SGSMSGDIR)/elfedit_shdr \ 113 $(SGSMSGDIR)/elfedit_str \ 114 $(SGSMSGDIR)/elfedit_sym \ 115 $(SGSMSGDIR)/elfedit_syminfo 116 117 chkmsg: $(SRCS) 118 sh $(CHKMSG) -m ../common/cap.msg ../common/cap.c 119 sh $(CHKMSG) -m ../common/dyn.msg ../common/dyn.c 120 sh $(CHKMSG) -m ../common/ehdr.msg ../common/ehdr.c 121 sh $(CHKMSG) -m ../common/phdr.msg ../common/phdr.c 122 sh $(CHKMSG) -m ../common/shdr.msg ../common/shdr.c 123 sh $(CHKMSG) -m ../common/str.msg ../common/str.c 124 sh $(CHKMSG) -m ../common/sym.msg ../common/sym.c 125 sh $(CHKMSG) -m ../common/syminfo.msg ../common/syminfo.c 126 127 128 include $(SRC)/lib/Makefile.targ