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
18 # Search paths for source files
23 $(ACPICA_DISASSEMBLER
)\
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
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\
57 $(OBJDIR
)/aslallocate.o\
58 $(OBJDIR
)/aslanalyze.o\
60 $(OBJDIR
)/aslbtypes.o\
62 $(OBJDIR
)/aslcodegen.o\
63 $(OBJDIR
)/aslcompile.o\
66 $(OBJDIR
)/aslexternal.o\
68 $(OBJDIR
)/aslfileio.o\
72 $(OBJDIR
)/asllength.o\
73 $(OBJDIR
)/asllisting.o\
74 $(OBJDIR
)/asllistsup.o\
76 $(OBJDIR
)/asllookup.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\
89 $(OBJDIR
)/asloptions.o\
90 $(OBJDIR
)/aslparseop.o\
91 $(OBJDIR
)/aslpredef.o\
92 $(OBJDIR
)/aslprepkg.o\
93 $(OBJDIR
)/aslprintf.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\
107 $(OBJDIR
)/asltransform.o\
109 $(OBJDIR
)/aslutils.o\
111 $(OBJDIR
)/aslwalks.o\
113 $(OBJDIR
)/aslxrefout.o\
114 $(OBJDIR
)/cvcompiler.o\
115 $(OBJDIR
)/cvdisasm.o\
116 $(OBJDIR
)/cvparser.o\
118 $(OBJDIR
)/dbfileio.o\
119 $(OBJDIR
)/dmbuffer.o\
120 $(OBJDIR
)/dmcstyle.o\
121 $(OBJDIR
)/dmdeferred.o\
122 $(OBJDIR
)/dmextern.o\
124 $(OBJDIR
)/dmopcode.o\
126 $(OBJDIR
)/dmresrcl.o\
127 $(OBJDIR
)/dmresrcl2.o\
128 $(OBJDIR
)/dmresrcs.o\
129 $(OBJDIR
)/dmrestag.o\
130 $(OBJDIR
)/dmswitch.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\
144 $(OBJDIR
)/dscontrol.o\
146 $(OBJDIR
)/dsobject.o\
147 $(OBJDIR
)/dsopcode.o\
148 $(OBJDIR
)/dspkginit.o\
152 $(OBJDIR
)/dswload2.o\
153 $(OBJDIR
)/dswscope.o\
154 $(OBJDIR
)/dswstate.o\
155 $(OBJDIR
)/dtcompile.o\
156 $(OBJDIR
)/dtexpress.o\
159 $(OBJDIR
)/dtsubtable.o\
161 $(OBJDIR
)/dttable1.o\
162 $(OBJDIR
)/dttable2.o\
163 $(OBJDIR
)/dttemplate.o\
165 $(OBJDIR
)/exconcat.o\
166 $(OBJDIR
)/exconvrt.o\
167 $(OBJDIR
)/excreate.o\
172 $(OBJDIR
)/exoparg1.o\
173 $(OBJDIR
)/exoparg2.o\
174 $(OBJDIR
)/exoparg3.o\
175 $(OBJDIR
)/exoparg6.o\
177 $(OBJDIR
)/exregion.o\
178 $(OBJDIR
)/exresnte.o\
179 $(OBJDIR
)/exresolv.o\
182 $(OBJDIR
)/exstoren.o\
183 $(OBJDIR
)/exstorob.o\
184 $(OBJDIR
)/exsystem.o\
187 $(OBJDIR
)/nsaccess.o\
191 $(OBJDIR
)/nsobject.o\
193 $(OBJDIR
)/nssearch.o\
197 $(OBJDIR
)/osunixxf.o\
198 $(OBJDIR
)/prexpress.o\
199 $(OBJDIR
)/prmacros.o\
204 $(OBJDIR
)/psobject.o\
205 $(OBJDIR
)/psopcode.o\
206 $(OBJDIR
)/psopinfo.o\
214 $(OBJDIR
)/tbinstal.o\
218 $(OBJDIR
)/tbxfload.o\
219 $(OBJDIR
)/utaddress.o\
222 $(OBJDIR
)/utbuffer.o\
226 $(OBJDIR
)/utdecode.o\
227 $(OBJDIR
)/utdelete.o\
230 $(OBJDIR
)/utglobal.o\
237 $(OBJDIR
)/utnonansi.o\
238 $(OBJDIR
)/utobject.o\
239 $(OBJDIR
)/utownerid.o\
240 $(OBJDIR
)/utpredef.o\
241 $(OBJDIR
)/utresdecode.o\
244 $(OBJDIR
)/utstrtoul64.o\
245 $(OBJDIR
)/utstrsuppt.o\
246 $(OBJDIR
)/utstring.o\
249 $(OBJDIR
)/utxferror.o
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
263 $(OBJDIR
)/aslcompiler.y.h\
264 $(OBJDIR
)/dtcompilerparser.y.h\
265 $(OBJDIR
)/dtparser.y.h\
266 $(OBJDIR
)/prparser.y.h
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
280 $(ASL_COMPILER
)/aslcompiler.l\
281 $(ASL_COMPILER
)/aslsupport.l\
282 $(OBJDIR
)/aslcompiler.y.h
286 # Flags specific to iASL compiler
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.
304 _d
=`mktemp -d $(OBJDIR)/$(1).XXXXXX` &&\
306 $(YACC
) $(YFLAGS
) -v
-d
-p
$(1) "$(abspath $(2))" &&\
308 mv
$$_d/y.tab
$(suffix $(3)) $(3);\
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
$@
$<