Print this page
9852 enable ld(1) guidance and deflib assertions for the illumos build
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/geniconvtbl/Makefile.com
+++ new/usr/src/cmd/geniconvtbl/Makefile.com
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 #
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 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
22 22 # Use is subject to license terms.
23 23 #
24 24
25 25 $(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN)
26 26
27 27 ITM = geniconvtbl.so
28 28 PROG = geniconvtbl
29 29
30 30 SRCSH1 = iconv_tm.h hash.h
31 31 SRCCH1 = itmcomp.h itm_util.h maptype.h
32 32 SRCSC1 = itmcomp.c assemble.c disassemble.c itm_util.c
33 33 SRCY1 = itm_comp.y
34 34 SRCL1 = itm_comp.l
35 35 SRCI1 = geniconvtbl.c
36 36
37 37
38 38 YTABC = y.tab.c
39 39 YTABH = y.tab.h
40 40 LEXYY = lex.yy.c
41 41 YOUT = y.output
42 42 MAPFILE = ../mapfile
43 43
44 44
45 45
46 46 SRCSH = $(SRCSH1:%.h=../%.h)
47 47 SRCCH = $(SRCCH1:%.h=../%.h)
48 48 SRCSC = $(SRCSC1:%.c=../%.c)
49 49 SRCI = $(SRCI1:%.c=../%.c)
50 50 SRCY = $(SRCY1:%.y=../%.y)
51 51 SRCL = $(SRCL1:%.l=../%.l)
52 52
53 53 SRCYC = $(SRCY:%.y=%.c)
54 54 SRCLC = $(SRCL:%.l=%.c)
55 55
56 56 SRCS = $(SRCSC) $(YTABC) $(LEXYY)
57 57 HDRS = $(SRCCH1) $(ERNOSTRH)
58 58
59 59
60 60
61 61 SED = sed
62 62 LEXSED = ../lex.sed
63 63 YACCSED = ../yacc.sed
64 64
65 65
66 66
↓ open down ↓ |
66 lines elided |
↑ open up ↑ |
67 67 # include ../../../lib/Makefile.lib
68 68 include ../../Makefile.cmd
69 69
70 70
71 71 ROOTDIRS32= $(ROOTLIB)/iconv
72 72 ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64)
73 73 ROOTITM32 = $(ROOTDIRS32)/$(ITM)
74 74 ROOTITM64 = $(ROOTDIRS64)/$(ITM)
75 75
76 76 #
77 -# definition for some useful target like clean,
77 +# definition for some useful target like clean,
78 78 OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o)
79 79
80 80 CHECKHDRS = $(HDRS%.h=%.check)
81 81
82 82 CLOBBERFILES= $(ITM) $(SRCYC)
83 -CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
83 +CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \
84 84 $(POFILES) $(POFILE)
85 85
86 86 CPPFLAGS += -I. -I..
87 87 CERRWARN += -_gcc=-Wno-uninitialized
88 88 CERRWARN += -_gcc=-Wno-unused-label
89 89 CERRWARN += -_gcc=-Wno-switch
90 90 CERRWARN += -_gcc=-Wno-unused-variable
91 91 CERRWARN += -_gcc=-Wno-implicit-function-declaration
92 92 YFLAGS += -d -v
93 -CFLAGS += -D_FILE_OFFSET_BITS=64
93 +CFLAGS += -D_FILE_OFFSET_BITS=64
94 94
95 95 $(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@
96 -$(ITM) := CPPFLAGS += -D_REENTRANT
96 +$(ITM) := CPPFLAGS += -D_REENTRANT
97 97 $(ITM) := sparc_CFLAGS += -xregs=no%appl
98 98 $(ITM) := sparcv9_CFLAGS += -xregs=no%appl
99 99
100 100 LDLIBS += -lgen
101 101
102 102 MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
103 -MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
103 +MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) \
104 + $(MAPFILE.NED:%=-M%) -Bdirect \
105 + -zassert-deflib=libgen.so \
106 + -zassert-deflib=libc.so
104 107 MY_NATIVE_LDLIBS = -lgen
105 108
106 109 #
107 110 # Message catalog
108 111 #
109 112 POFILES= $(SRCSC1:%.c=%.po) $(SRCI1:%.c=%.po) \
110 113 $(SRCY1:%.y=%.po) $(SRCL1:%.l=%.po)
111 114
112 115 POFILE= geniconvtbl_.po
113 116
114 117
115 118
116 119
117 120
118 121 .KEEP_STATE:
119 122
120 123 .PARALLEL: $(ITM) $(OBJS)
121 124
122 125 $(PROG): $(OBJS)
123 126 $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
124 127 $(POST_PROCESS)
125 128
126 129 $(ITM): $(SRCI)
127 130 $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
128 131 $(POST_PROCESS_SO)
129 132
130 133 $(YTABC) $(YTABH): $(SRCY)
131 134 $(YACC) $(YFLAGS) $(SRCY)
132 135 @ $(MV) $(YTABC) $(YTABC)~
133 136 @ $(SED) -f $(YACCSED) $(YTABC)~ > $(YTABC)
134 137 @ $(RM) $(YTABC)~
135 138
136 139 $(LEXYY): $(SRCL) $(YTABH)
137 140 $(LEX) -t $(SRCL) | $(SED) -f $(LEXSED) > $(LEXYY)
138 141
139 142
140 143 $(POFILE): .WAIT $(POFILES)
141 144 $(RM) $@
142 145 $(CAT) $(POFILES) >$@
143 146
144 147 $(POFILES): $(SRCSC) $(SRCI) $(SRCY) $(SRCL)
145 148
146 149 %.po: ../%.c
147 150 $(COMPILE.cpp) $< > $<.i
148 151 $(BUILD.po)
149 152
150 153
151 154 lint : lint_SRCS1 lint_SRCS2
152 155
153 156
154 157 lint_SRCS1: $(SRCS)
155 158 $(LINT.c) $(SRCS) $(LDLIBS)
156 159
157 160 lint_SRCS2: $(SRCI)
158 161 $(LINT.c) $(SRCI) $(LDLIBS)
159 162
160 163
161 164
162 165 hdrchk: $(HDRCHECKS)
163 166
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
164 167 cstyle: $(SRCS)
165 168 $(DOT_C_CHECK)
166 169
167 170 clean:
168 171 $(RM) $(CLEANFILES)
169 172
170 173 debug:
171 174 $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG'
172 175
173 176
174 -%.o: %.c
177 +%.o: %.c
175 178 $(COMPILE.c) $<
176 179
177 180 %.o: ../%.c
178 181 $(COMPILE.c) $<
179 182
180 183
181 184
182 185 # install rule
183 -#
186 +#
184 187 $(ROOTDIRS32)/%: $(ROOTDIRS32) %
185 188 -$(INS.file)
186 189
187 190 $(ROOTDIRS64)/%: $(ROOTDIRS64) %
188 191 -$(INS.file)
189 192
190 193 $(ROOTDIRS32): $(ROOTLIB)
191 194 -$(INS.dir)
192 195
193 196 $(ROOTDIRS64): $(ROOTDIRS32)
194 197 -$(INS.dir)
195 198
196 199 $(ROOTLIB) $(ROOTBIN):
197 200 -$(INS.dir)
198 201
199 202 include ../../Makefile.targ
200 203
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX