Print this page
7612 SGSPROTO lacks structure
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/libelf/Makefile.targ
+++ new/usr/src/cmd/sgs/libelf/Makefile.targ
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
23 +# Copyright 2016 RackTop Systems.
23 24 #
24 25
25 26 objs/%.o \
26 27 pics/%.o: %.c
27 28 $(COMPILE.c) -o $@ $<
28 29 $(POST_PROCESS_O)
29 30
30 31 objs/%64.o \
31 32 pics/%64.o: ../common/%.c
32 33 $(COMPILE.c) -D_ELF64 -o $@ $<
33 34 $(POST_PROCESS_O)
34 35
35 36 objs/%.o \
36 37 pics/%.o: ../misc/%.c
37 38 $(COMPILE.c) -DELF -o $@ $<
38 39 $(POST_PROCESS_O)
39 40
40 41 objs/%.o \
41 42 pics/%.o: ../common/%.c
42 43 $(COMPILE.c) -o $@ $<
43 44 $(POST_PROCESS_O)
44 45
45 46 all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
46 47
47 48 install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \
48 49 $(ROOTFS_LINTLIB) \
49 50 .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) \
50 51 $(ROOTFS_LIBDIR)/$(LINTLIBSRC)
51 52
52 53 $(ROOTFS_LIBDIR)/$(LINTLIBSRC): ../common/$(LINTLIBSRC)
53 54 $(VAR_POUND_1) $(INS.file) ../common/$(LINTLIBSRC)
54 55
55 56 lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT)
56 57
57 58 .PARALLEL: $(LINTOUT32) $(LINTOUT64)
58 59
59 60 delete:
60 61 $(RM) $(DYNLIB)
61 62
62 63 $(LIBLINKS):
63 64 $(RM) $(LIBLINKS)
64 65 $(SYMLINK) $(DYNLIB) $(LIBLINKS)
65 66
66 67 CLOBBERFILES += $(LIBLINKS)
67 68
68 69 # include common library targets
69 70 #
70 71 include $(SRC)/lib/Makefile.targ
71 72 include $(SRC)/cmd/sgs/Makefile.targ
72 73
73 74 xlate.c: ../common/xlate.m4
74 75 $(M4) < ../common/xlate.m4 > xlate.c
75 76
76 77 xlate64.c: ../common/xlate64.m4
77 78 $(M4) < ../common/xlate64.m4 > xlate64.c
78 79
79 80
80 81 objs/msg.o \
81 82 pics/msg.o: msg.c
82 83
83 84 objs/error.o \
84 85 pics/error.o: msg.h
85 86
86 87 objs/ar.o \
87 88 pics/ar.o: msg.h
88 89
89 90 objs/xlate.o \
90 91 pics/xlate.o: xlate.c
91 92
92 93 #
93 94 # Targets needed to support running of Warlock. The old warlock can be
94 95 # located at:
95 96 # suntools.eng:/export/tools/internal/warlock
96 97 #
97 98 # to use add the following to your path:
98 99 # export PATH=/net/suntools.eng/export/tools/internal/warlock/bin:$PATH
99 100 #
100 101 # The newer warlock is at:
101 102 # export PATH=/ws/onnv-gate/public/warlock/$MACH:$PATH
102 103 #
103 104 # This target has value for manual debugging, but is not suitable
104 105 # for production use. For this reason, the necessary rules are commented
105 106 # out with '###'. Remove the comments to use it.
106 107 #
107 108 ###warlock := CFLAGS=
108 109 ###
109 110 ###.PARALLEL: $(WARLOCKFILES)
110 111 ###warlock: wlocks .WAIT warlock_files
111 112 ### warlock -c ../common/libelf.wlcmd $(WARLOCKFILES)
112 113 ###
113 114 ###warlock_files: $(BLTSRCS) .WAIT $(WARLOCKFILES)
114 115 ###
115 116 ###wlocks:
116 117 ### -@mkdir -p $@
117 118 ###
118 119 ###wlocks/%.ll: %.c
119 120 ### wlcc $(CFLAGS) $(CPPFLAGS) -o $@ $<
120 121 ###
121 122 ###wlocks/%.ll: ../misc/%.c
122 123 ### wlcc $(CFLAGS) $(CPPFLAGS) -o $@ $<
123 124 ###
↓ open down ↓ |
91 lines elided |
↑ open up ↑ |
124 125 ###wlocks/%.ll: ../common/%.c
125 126 ### wlcc $(CFLAGS) $(CPPFLAGS) -o $@ $<
126 127 ###
127 128 ###wlocks/%64.ll: ../common/%.c
128 129 ### wlcc -D_ELF64 $(CFLAGS) $(CPPFLAGS) -o $@ $<
129 130
130 131
131 132 # Special target for native builds (ie. when we need to build a version of ld
132 133 # to build a version of ld :-).
133 134
134 -native: $(SGSPROTO)/$(DYNLIB)
135 +native: $(SGSLIBDIR)/$(LIBLINKS)
135 136
136 -$(SGSPROTO)/$(DYNLIB): \
137 - pics .WAIT $$(PICS)
137 +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS)
138 138 $(BUILD.SO)
139 139 $(POST_PROCESS_SO)
140 - -@$(RM) $(SGSPROTO)/$(LIBLINKS)
141 - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS)
140 +
141 +$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB)
142 + -@$(RM) $(SGSLIBDIR)/$(LIBLINKS)
143 + $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS)
142 144
143 145
144 146 # Derived source and header files (messaging). Make sure that the sgsmsg
145 147 # command is constructed - libelf might not be built with the whole sgs.
146 148
147 149 catalog: $(BLTMESG)
148 150
149 151 chkmsg: $(LIBSRCS)
150 152 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
151 153
152 154 $(BLTDEFS) + \
153 155 $(BLTDATA): $(SGSMSG) $(SGSMSGTARG)
154 156 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
155 157
156 158 $(BLTMESG): $(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c
157 159 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
158 160
159 161 $(SGSMSG): FRC
160 162 @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog
161 163 @ pwd
162 164
163 165 FRC:
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX