rtld - do not allow both dynamic DTV index and static TLS offset
[dragonfly.git] / sys / contrib / dev / acpica / generate / unix / iasl / Makefile
blob47ea73caba9965249a764507637a3165461f365d
2 # iASL compiler/disassembler
6 # Note: This makefile is intended to be used from within the native
7 # ACPICA directory structure, from under generate/unix. It specifically
8 # places all object files in a generate/unix subdirectory, not within
9 # the various ACPICA source directories. This prevents collisions
10 # between different compilations of the same source file with different
11 # compile options, and prevents pollution of the source code.
13 include ../Makefile.config
14 FINAL_PROG = ../$(BINDIR)/iasl
15 PROG = $(OBJDIR)/iasl
18 # Search paths for source files
20 vpath %.c \
21 $(ASL_COMPILER)\
22 $(ACPICA_DEBUGGER)\
23 $(ACPICA_DISASSEMBLER)\
24 $(ACPICA_DISPATCHER)\
25 $(ACPICA_EXECUTER)\
26 $(ACPICA_NAMESPACE)\
27 $(ACPICA_PARSER)\
28 $(ACPICA_TABLES)\
29 $(ACPICA_UTILITIES)\
30 $(ACPICA_COMMON)\
31 $(ACPICA_OSL)
33 HEADERS = \
34 $(wildcard $(ASL_COMPILER)/*.h)\
35 $(OBJDIR)/aslcompiler.y.h\
36 $(OBJDIR)/dtcompilerparser.y.h\
37 $(OBJDIR)/dtparser.y.h\
38 $(OBJDIR)/prparser.y.h
40 OBJECTS = \
41 $(OBJDIR)/aslcompilerlex.o\
42 $(OBJDIR)/aslcompilerparse.o\
43 $(OBJDIR)/dtcompilerparserlex.o\
44 $(OBJDIR)/dtcompilerparserparse.o\
45 $(OBJDIR)/dtparserlex.o\
46 $(OBJDIR)/dtparserparse.o\
47 $(OBJDIR)/prparserlex.o\
48 $(OBJDIR)/prparserparse.o\
49 $(OBJDIR)/acfileio.o\
50 $(OBJDIR)/adfile.o\
51 $(OBJDIR)/adisasm.o\
52 $(OBJDIR)/adwalk.o\
53 $(OBJDIR)/ahids.o\
54 $(OBJDIR)/ahpredef.o\
55 $(OBJDIR)/ahtable.o\
56 $(OBJDIR)/ahuuids.o\
57 $(OBJDIR)/aslallocate.o\
58 $(OBJDIR)/aslanalyze.o\
59 $(OBJDIR)/aslascii.o\
60 $(OBJDIR)/aslbtypes.o\
61 $(OBJDIR)/aslcache.o\
62 $(OBJDIR)/aslcodegen.o\
63 $(OBJDIR)/aslcompile.o\
64 $(OBJDIR)/asldebug.o\
65 $(OBJDIR)/aslerror.o\
66 $(OBJDIR)/aslexternal.o\
67 $(OBJDIR)/aslfiles.o\
68 $(OBJDIR)/aslfileio.o\
69 $(OBJDIR)/aslfold.o\
70 $(OBJDIR)/aslhelp.o\
71 $(OBJDIR)/aslhex.o\
72 $(OBJDIR)/asllength.o\
73 $(OBJDIR)/asllisting.o\
74 $(OBJDIR)/asllistsup.o\
75 $(OBJDIR)/aslload.o\
76 $(OBJDIR)/asllookup.o\
77 $(OBJDIR)/aslmain.o\
78 $(OBJDIR)/aslmap.o\
79 $(OBJDIR)/aslmapenter.o\
80 $(OBJDIR)/aslmapoutput.o\
81 $(OBJDIR)/aslmaputils.o\
82 $(OBJDIR)/aslmessages.o\
83 $(OBJDIR)/aslmethod.o\
84 $(OBJDIR)/aslnamesp.o\
85 $(OBJDIR)/asloffset.o\
86 $(OBJDIR)/aslopcodes.o\
87 $(OBJDIR)/asloperands.o\
88 $(OBJDIR)/aslopt.o\
89 $(OBJDIR)/asloptions.o\
90 $(OBJDIR)/aslparseop.o\
91 $(OBJDIR)/aslpredef.o\
92 $(OBJDIR)/aslprepkg.o\
93 $(OBJDIR)/aslprintf.o\
94 $(OBJDIR)/aslprune.o\
95 $(OBJDIR)/aslresource.o\
96 $(OBJDIR)/aslrestype1.o\
97 $(OBJDIR)/aslrestype1i.o\
98 $(OBJDIR)/aslrestype2.o\
99 $(OBJDIR)/aslrestype2d.o\
100 $(OBJDIR)/aslrestype2e.o\
101 $(OBJDIR)/aslrestype2q.o\
102 $(OBJDIR)/aslrestype2s.o\
103 $(OBJDIR)/aslrestype2w.o\
104 $(OBJDIR)/aslstartup.o\
105 $(OBJDIR)/aslstubs.o\
106 $(OBJDIR)/aslpld.o\
107 $(OBJDIR)/asltransform.o\
108 $(OBJDIR)/asltree.o\
109 $(OBJDIR)/aslutils.o\
110 $(OBJDIR)/asluuid.o\
111 $(OBJDIR)/aslwalks.o\
112 $(OBJDIR)/aslxref.o\
113 $(OBJDIR)/aslxrefout.o\
114 $(OBJDIR)/cvcompiler.o\
115 $(OBJDIR)/cvdisasm.o\
116 $(OBJDIR)/cvparser.o\
117 $(OBJDIR)/cmfsize.o\
118 $(OBJDIR)/dbfileio.o\
119 $(OBJDIR)/dmbuffer.o\
120 $(OBJDIR)/dmcstyle.o\
121 $(OBJDIR)/dmdeferred.o\
122 $(OBJDIR)/dmextern.o\
123 $(OBJDIR)/dmnames.o\
124 $(OBJDIR)/dmopcode.o\
125 $(OBJDIR)/dmresrc.o\
126 $(OBJDIR)/dmresrcl.o\
127 $(OBJDIR)/dmresrcl2.o\
128 $(OBJDIR)/dmresrcs.o\
129 $(OBJDIR)/dmrestag.o\
130 $(OBJDIR)/dmswitch.o\
131 $(OBJDIR)/dmtable.o\
132 $(OBJDIR)/dmtables.o\
133 $(OBJDIR)/dmtbdump.o\
134 $(OBJDIR)/dmtbdump1.o\
135 $(OBJDIR)/dmtbdump2.o\
136 $(OBJDIR)/dmtbdump3.o\
137 $(OBJDIR)/dmtbinfo.o\
138 $(OBJDIR)/dmtbinfo1.o\
139 $(OBJDIR)/dmtbinfo2.o\
140 $(OBJDIR)/dmtbinfo3.o\
141 $(OBJDIR)/dmutils.o\
142 $(OBJDIR)/dmwalk.o\
143 $(OBJDIR)/dsargs.o\
144 $(OBJDIR)/dscontrol.o\
145 $(OBJDIR)/dsfield.o\
146 $(OBJDIR)/dsobject.o\
147 $(OBJDIR)/dsopcode.o\
148 $(OBJDIR)/dspkginit.o\
149 $(OBJDIR)/dsutils.o\
150 $(OBJDIR)/dswexec.o\
151 $(OBJDIR)/dswload.o\
152 $(OBJDIR)/dswload2.o\
153 $(OBJDIR)/dswscope.o\
154 $(OBJDIR)/dswstate.o\
155 $(OBJDIR)/dtcompile.o\
156 $(OBJDIR)/dtexpress.o\
157 $(OBJDIR)/dtfield.o\
158 $(OBJDIR)/dtio.o\
159 $(OBJDIR)/dtsubtable.o\
160 $(OBJDIR)/dttable.o\
161 $(OBJDIR)/dttable1.o\
162 $(OBJDIR)/dttable2.o\
163 $(OBJDIR)/dttemplate.o\
164 $(OBJDIR)/dtutils.o\
165 $(OBJDIR)/exconcat.o\
166 $(OBJDIR)/exconvrt.o\
167 $(OBJDIR)/excreate.o\
168 $(OBJDIR)/exdump.o\
169 $(OBJDIR)/exmisc.o\
170 $(OBJDIR)/exmutex.o\
171 $(OBJDIR)/exnames.o\
172 $(OBJDIR)/exoparg1.o\
173 $(OBJDIR)/exoparg2.o\
174 $(OBJDIR)/exoparg3.o\
175 $(OBJDIR)/exoparg6.o\
176 $(OBJDIR)/exprep.o\
177 $(OBJDIR)/exregion.o\
178 $(OBJDIR)/exresnte.o\
179 $(OBJDIR)/exresolv.o\
180 $(OBJDIR)/exresop.o\
181 $(OBJDIR)/exstore.o\
182 $(OBJDIR)/exstoren.o\
183 $(OBJDIR)/exstorob.o\
184 $(OBJDIR)/exsystem.o\
185 $(OBJDIR)/exutils.o\
186 $(OBJDIR)/getopt.o\
187 $(OBJDIR)/nsaccess.o\
188 $(OBJDIR)/nsalloc.o\
189 $(OBJDIR)/nsdump.o\
190 $(OBJDIR)/nsnames.o\
191 $(OBJDIR)/nsobject.o\
192 $(OBJDIR)/nsparse.o\
193 $(OBJDIR)/nssearch.o\
194 $(OBJDIR)/nsutils.o\
195 $(OBJDIR)/nswalk.o\
196 $(OBJDIR)/nsxfobj.o\
197 $(OBJDIR)/osunixxf.o\
198 $(OBJDIR)/prexpress.o\
199 $(OBJDIR)/prmacros.o\
200 $(OBJDIR)/prscan.o\
201 $(OBJDIR)/prutils.o\
202 $(OBJDIR)/psargs.o\
203 $(OBJDIR)/psloop.o\
204 $(OBJDIR)/psobject.o\
205 $(OBJDIR)/psopcode.o\
206 $(OBJDIR)/psopinfo.o\
207 $(OBJDIR)/psparse.o\
208 $(OBJDIR)/psscope.o\
209 $(OBJDIR)/pstree.o\
210 $(OBJDIR)/psutils.o\
211 $(OBJDIR)/pswalk.o\
212 $(OBJDIR)/tbdata.o\
213 $(OBJDIR)/tbfadt.o\
214 $(OBJDIR)/tbinstal.o\
215 $(OBJDIR)/tbprint.o\
216 $(OBJDIR)/tbutils.o\
217 $(OBJDIR)/tbxface.o\
218 $(OBJDIR)/tbxfload.o\
219 $(OBJDIR)/utaddress.o\
220 $(OBJDIR)/utalloc.o\
221 $(OBJDIR)/utascii.o\
222 $(OBJDIR)/utbuffer.o\
223 $(OBJDIR)/utcache.o\
224 $(OBJDIR)/utcopy.o\
225 $(OBJDIR)/utdebug.o\
226 $(OBJDIR)/utdecode.o\
227 $(OBJDIR)/utdelete.o\
228 $(OBJDIR)/uterror.o\
229 $(OBJDIR)/utexcep.o\
230 $(OBJDIR)/utglobal.o\
231 $(OBJDIR)/uthex.o\
232 $(OBJDIR)/utinit.o\
233 $(OBJDIR)/utlock.o\
234 $(OBJDIR)/utmath.o\
235 $(OBJDIR)/utmisc.o\
236 $(OBJDIR)/utmutex.o\
237 $(OBJDIR)/utnonansi.o\
238 $(OBJDIR)/utobject.o\
239 $(OBJDIR)/utownerid.o\
240 $(OBJDIR)/utpredef.o\
241 $(OBJDIR)/utresdecode.o\
242 $(OBJDIR)/utresrc.o\
243 $(OBJDIR)/utstate.o\
244 $(OBJDIR)/utstrtoul64.o\
245 $(OBJDIR)/utstrsuppt.o\
246 $(OBJDIR)/utstring.o\
247 $(OBJDIR)/utuuid.o\
248 $(OBJDIR)/utxface.o\
249 $(OBJDIR)/utxferror.o
251 INTERMEDIATES = \
252 $(OBJDIR)/aslcompiler.y\
253 $(OBJDIR)/aslcompilerlex.c\
254 $(OBJDIR)/aslcompilerparse.c\
255 $(OBJDIR)/dtparserlex.c\
256 $(OBJDIR)/dtparserparse.c\
257 $(OBJDIR)/dtcompilerparserlex.c\
258 $(OBJDIR)/dtcompilerparserparse.c\
259 $(OBJDIR)/prparserlex.c\
260 $(OBJDIR)/prparserparse.c
262 MISC = \
263 $(OBJDIR)/aslcompiler.y.h\
264 $(OBJDIR)/dtcompilerparser.y.h\
265 $(OBJDIR)/dtparser.y.h\
266 $(OBJDIR)/prparser.y.h
268 ASL_PARSER = \
269 $(ASL_COMPILER)/aslcstyle.y\
270 $(ASL_COMPILER)/aslhelpers.y\
271 $(ASL_COMPILER)/aslparser.y\
272 $(ASL_COMPILER)/aslprimaries.y\
273 $(ASL_COMPILER)/aslresources.y\
274 $(ASL_COMPILER)/aslrules.y\
275 $(ASL_COMPILER)/aslsupport.y\
276 $(ASL_COMPILER)/asltokens.y\
277 $(ASL_COMPILER)/asltypes.y
279 ASL_LEXER = \
280 $(ASL_COMPILER)/aslcompiler.l\
281 $(ASL_COMPILER)/aslsupport.l\
282 $(OBJDIR)/aslcompiler.y.h
286 # Flags specific to iASL compiler
288 CFLAGS += \
289 -DACPI_ASL_COMPILER\
290 -I$(ASL_COMPILER)\
291 -I$(OBJDIR)
294 # Common Rules
296 include ../Makefile.rules
299 # Function to safely execute yacc:
300 # Generate the output files to a temporary directory,
301 # move the file to $(OBJDIR), and discard the directory.
303 safe_yacc = \
304 _d=`mktemp -d $(OBJDIR)/$(1).XXXXXX` &&\
305 cd $$_d &&\
306 $(YACC) $(YFLAGS) -v -d -p$(1) "$(abspath $(2))" &&\
307 cd - > /dev/null;\
308 mv $$_d/y.tab$(suffix $(3)) $(3);\
309 _r=$$?;\
310 rm -fr $$_d;\
311 exit $$_r
314 # Macro processing for iASL .y files
316 $(OBJDIR)/aslcompiler.y : $(ASL_PARSER)
317 @echo "- " $(MACROPROC) " Preprocess main iASL parser"
318 @$(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $@
321 # Parser and Lexer - intermediate C files
323 $(OBJDIR)/aslcompilerlex.c : $(ASL_LEXER)
324 @echo "- " $(LEX) " "$<
325 @$(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l
327 $(OBJDIR)/aslcompilerparse.c $(OBJDIR)/aslcompiler.y.h : $(OBJDIR)/aslcompiler.y
328 @echo "- " $(YACC) " "$<
329 @$(call safe_yacc,AslCompiler,$<,$@)
331 $(OBJDIR)/dtcompilerparserlex.c : $(ASL_COMPILER)/dtcompilerparser.l $(OBJDIR)/dtcompilerparser.y.h
332 @echo "- " $(LEX) " "$<
333 @$(LEX) $(DLFLAGS) -PDtCompilerParser -o$@ $<
335 $(OBJDIR)/dtcompilerparserparse.c $(OBJDIR)/dtcompilerparser.y.h : $(ASL_COMPILER)/dtcompilerparser.y
336 @echo "- " $(YACC) " "$<
337 @$(call safe_yacc,DtCompilerParser,$<,$@)
339 $(OBJDIR)/dtparserlex.c : $(ASL_COMPILER)/dtparser.l $(OBJDIR)/dtparser.y.h
340 @echo "- " $(LEX) " "$<
341 @$(LEX) $(DLFLAGS) -PDtParser -o$@ $<
343 $(OBJDIR)/dtparserparse.c $(OBJDIR)/dtparser.y.h : $(ASL_COMPILER)/dtparser.y
344 @echo "- " $(YACC) " "$<
345 @$(call safe_yacc,DtParser,$<,$@)
347 $(OBJDIR)/prparserlex.c : $(ASL_COMPILER)/prparser.l $(OBJDIR)/prparser.y.h
348 @echo "- " $(LEX) " "$<
349 @$(LEX) $(LFLAGS) -PPrParser -o$@ $<
351 $(OBJDIR)/prparserparse.c $(OBJDIR)/prparser.y.h : $(ASL_COMPILER)/prparser.y
352 @echo "- " $(YACC) " "$<
353 @$(call safe_yacc,PrParser,$<,$@)
356 # Parsers and Lexers - final object files
358 # Cannot use the common compile warning flags since the C files are created
359 # by the utilities above and they are not necessarily ANSI C, etc.
361 $(OBJDIR)/aslcompilerlex.o : $(OBJDIR)/aslcompilerlex.c
362 @echo "- " "Intermediate" $<
363 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
365 $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
366 @echo "- " "Intermediate" $<
367 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
369 $(OBJDIR)/dtcompilerparserlex.o : $(OBJDIR)/dtcompilerparserlex.c
370 @echo "- " "Intermediate" $<
371 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
373 $(OBJDIR)/dtcompilerparserparse.o : $(OBJDIR)/dtcompilerparserparse.c
374 @echo "- " "Intermediate" $<
375 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
377 $(OBJDIR)/dtparserlex.o : $(OBJDIR)/dtparserlex.c
378 @echo "- " "Intermediate" $<
379 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
381 $(OBJDIR)/dtparserparse.o : $(OBJDIR)/dtparserparse.c
382 @echo "- " "Intermediate" $<
383 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
385 $(OBJDIR)/prparserlex.o : $(OBJDIR)/prparserlex.c
386 @echo "- " "Intermediate" $<
387 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
389 $(OBJDIR)/prparserparse.o : $(OBJDIR)/prparserparse.c
390 @echo "- " "Intermediate" $<
391 @$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<