1 # 2 # iASL compiler/disassembler 3 # 4 5 # 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. 12 # 13 include ../Makefile.config 14 PROG = iasl 15 16 # 17 # Flags specific to iASL compiler 18 # 19 CFLAGS+= \ 20 -DACPI_ASL_COMPILER \ 21 -I$(ASL_COMPILER) \ 22 -I. 23 24 OBJS = \ 25 adfile.o \ 26 adisasm.o \ 27 adwalk.o \ 28 aslanalyze.o \ 29 aslbtypes.o \ 30 aslcodegen.o \ 31 aslcompile.o \ 32 aslcompilerlex.o \ 33 aslcompilerparse.o \ 34 aslerror.o \ 35 aslfiles.o \ 36 aslfold.o \ 37 asllength.o \ 38 asllisting.o \ 39 aslload.o \ 40 asllookup.o \ 41 aslmain.o \ 42 aslmap.o \ 43 aslopcodes.o \ 44 asloperands.o \ 45 aslopt.o \ 46 aslpredef.o \ 47 aslresource.o \ 48 aslrestype1.o \ 49 aslrestype1i.o \ 50 aslrestype2.o \ 51 aslrestype2d.o \ 52 aslrestype2e.o \ 53 aslrestype2q.o \ 54 aslrestype2w.o \ 55 aslstartup.o \ 56 aslstubs.o \ 57 asltransform.o \ 58 asltree.o \ 59 aslutils.o \ 60 asluuid.o \ 61 aslwalks.o \ 62 dtcompile.o \ 63 dtexpress.o \ 64 dtfield.o \ 65 dtio.o \ 66 dtparserlex.o \ 67 dtparserparse.o \ 68 dtsubtable.o \ 69 dttable.o \ 70 dttemplate.o \ 71 dtutils.o \ 72 dbfileio.o \ 73 dmbuffer.o \ 74 dmextern.o \ 75 dmnames.o \ 76 dmobject.o \ 77 dmopcode.o \ 78 dmresrc.o \ 79 dmresrcl.o \ 80 dmresrcs.o \ 81 dmrestag.o \ 82 dmtable.o \ 83 dmtbdump.o \ 84 dmtbinfo.o \ 85 dmutils.o \ 86 dmwalk.o \ 87 dsargs.o \ 88 dscontrol.o \ 89 dsfield.o \ 90 dsobject.o \ 91 dsopcode.o \ 92 dsutils.o \ 93 dswexec.o \ 94 dswload.o \ 95 dswload2.o \ 96 dswscope.o \ 97 dswstate.o \ 98 exconvrt.o \ 99 excreate.o \ 100 exdump.o \ 101 exmisc.o \ 102 exmutex.o \ 103 exnames.o \ 104 exoparg1.o \ 105 exoparg2.o \ 106 exoparg3.o \ 107 exoparg6.o \ 108 exprep.o \ 109 exregion.o \ 110 exresnte.o \ 111 exresolv.o \ 112 exresop.o \ 113 exstore.o \ 114 exstoren.o \ 115 exstorob.o \ 116 exsystem.o \ 117 exutils.o \ 118 getopt.o \ 119 nsaccess.o \ 120 nsalloc.o \ 121 nsdump.o \ 122 nsnames.o \ 123 nsobject.o \ 124 nsparse.o \ 125 nssearch.o \ 126 nsutils.o \ 127 nswalk.o \ 128 nsxfobj.o \ 129 osunixxf.o \ 130 psargs.o \ 131 psloop.o \ 132 psopcode.o \ 133 psparse.o \ 134 psscope.o \ 135 pstree.o \ 136 psutils.o \ 137 pswalk.o \ 138 tbfadt.o \ 139 tbinstal.o \ 140 tbutils.o \ 141 tbxface.o \ 142 utalloc.o \ 143 utcache.o \ 144 utcopy.o \ 145 utdebug.o \ 146 utdecode.o \ 147 utdelete.o \ 148 utglobal.o \ 149 utinit.o \ 150 utlock.o \ 151 utmath.o \ 152 utmisc.o \ 153 utmutex.o \ 154 utobject.o \ 155 utresrc.o \ 156 utstate.o \ 157 utxferror.o \ 158 utxface.o 159 160 INTERMEDIATES = \ 161 aslcompilerlex.c \ 162 aslcompilerparse.c \ 163 dtparserlex.c \ 164 dtparserparse.c 165 166 MISC = \ 167 aslcompiler.y.h \ 168 aslcompilerparse.output \ 169 dtparser.y.h \ 170 dtparserparse.output 171 172 # 173 # Root rule 174 # 175 $(PROG) : $(INTERMEDIATES) $(OBJS) 176 $(CC) $(LDFLAGS) $(OBJS) -o $(PROG) 177 $(COPYPROG) 178 179 # 180 # Parser and Lexer - intermediate C files 181 # 182 aslcompilerlex.c : $(ASL_COMPILER)/aslcompiler.l 183 ${LEX} ${LFLAGS} -PAslCompiler -o$@ $? 184 185 aslcompilerparse.c : $(ASL_COMPILER)/aslcompiler.y 186 ${YACC} ${YFLAGS} -pAslCompiler -o$@ $? 187 @mv -f aslcompilerparse.h aslcompiler.y.h 188 189 dtparserlex.c : $(ASL_COMPILER)/dtparser.l 190 ${LEX} ${LFLAGS} -PDtParser -o$@ $? 191 192 dtparserparse.c : $(ASL_COMPILER)/dtparser.y 193 ${YACC} ${YFLAGS} -pDtParser -o$@ $? 194 @mv -f dtparserparse.h dtparser.y.h 195 196 # 197 # Parsers and Lexers - final object files 198 # 199 # Cannot use the common compile warning flags since the C files are created 200 # by the utilities above and they are not necessarily ANSI C, etc. 201 # 202 aslcompilerlex.o : aslcompilerlex.c 203 $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? 204 205 aslcompilerparse.o : aslcompilerparse.c 206 $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? 207 208 dtparserlex.o : dtparserlex.c 209 $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? 210 211 dtparserparse.o : dtparserparse.c 212 $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? 213 214 # 215 # Compiler source 216 # 217 aslanalyze.o : $(ASL_COMPILER)/aslanalyze.c 218 $(COMPILE) 219 220 aslbtypes.o : $(ASL_COMPILER)/aslbtypes.c 221 $(COMPILE) 222 223 aslcodegen.o : $(ASL_COMPILER)/aslcodegen.c 224 $(COMPILE) 225 226 aslcompile.o : $(ASL_COMPILER)/aslcompile.c 227 $(COMPILE) 228 229 aslerror.o : $(ASL_COMPILER)/aslerror.c 230 $(COMPILE) 231 232 aslfiles.o : $(ASL_COMPILER)/aslfiles.c 233 $(COMPILE) 234 235 aslfold.o : $(ASL_COMPILER)/aslfold.c 236 $(COMPILE) 237 238 asllength.o : $(ASL_COMPILER)/asllength.c 239 $(COMPILE) 240 241 asllisting.o : $(ASL_COMPILER)/asllisting.c 242 $(COMPILE) 243 244 aslload.o : $(ASL_COMPILER)/aslload.c 245 $(COMPILE) 246 247 asllookup.o : $(ASL_COMPILER)/asllookup.c 248 $(COMPILE) 249 250 aslmain.o : $(ASL_COMPILER)/aslmain.c 251 $(COMPILE) 252 253 aslmap.o : $(ASL_COMPILER)/aslmap.c 254 $(COMPILE) 255 256 aslopcodes.o : $(ASL_COMPILER)/aslopcodes.c 257 $(COMPILE) 258 259 asloperands.o : $(ASL_COMPILER)/asloperands.c 260 $(COMPILE) 261 262 aslopt.o : $(ASL_COMPILER)/aslopt.c 263 $(COMPILE) 264 265 aslpredef.o : $(ASL_COMPILER)/aslpredef.c 266 $(COMPILE) 267 268 aslresource.o : $(ASL_COMPILER)/aslresource.c 269 $(COMPILE) 270 271 aslrestype1.o : $(ASL_COMPILER)/aslrestype1.c 272 $(COMPILE) 273 274 aslrestype1i.o : $(ASL_COMPILER)/aslrestype1i.c 275 $(COMPILE) 276 277 aslrestype2.o : $(ASL_COMPILER)/aslrestype2.c 278 $(COMPILE) 279 280 aslrestype2d.o : $(ASL_COMPILER)/aslrestype2d.c 281 $(COMPILE) 282 283 aslrestype2e.o : $(ASL_COMPILER)/aslrestype2e.c 284 $(COMPILE) 285 286 aslrestype2q.o : $(ASL_COMPILER)/aslrestype2q.c 287 $(COMPILE) 288 289 aslrestype2w.o : $(ASL_COMPILER)/aslrestype2w.c 290 $(COMPILE) 291 292 aslstartup.o : $(ASL_COMPILER)/aslstartup.c 293 $(COMPILE) 294 295 aslstubs.o : $(ASL_COMPILER)/aslstubs.c 296 $(COMPILE) 297 298 asltransform.o : $(ASL_COMPILER)/asltransform.c 299 $(COMPILE) 300 301 asltree.o : $(ASL_COMPILER)/asltree.c 302 $(COMPILE) 303 304 aslutils.o : $(ASL_COMPILER)/aslutils.c 305 $(COMPILE) 306 307 asluuid.o : $(ASL_COMPILER)/asluuid.c 308 $(COMPILE) 309 310 aslwalks.o : $(ASL_COMPILER)/aslwalks.c 311 $(COMPILE) 312 313 # 314 # Data Table Compiler 315 # 316 dtcompile.o : $(ASL_COMPILER)/dtcompile.c 317 $(COMPILE) 318 319 dtexpress.o : $(ASL_COMPILER)/dtexpress.c 320 $(COMPILE) 321 322 dtfield.o : $(ASL_COMPILER)/dtfield.c 323 $(COMPILE) 324 325 dtio.o : $(ASL_COMPILER)/dtio.c 326 $(COMPILE) 327 328 dtsubtable.o : $(ASL_COMPILER)/dtsubtable.c 329 $(COMPILE) 330 331 dttable.o : $(ASL_COMPILER)/dttable.c 332 $(COMPILE) 333 334 dttemplate.o : $(ASL_COMPILER)/dttemplate.c 335 $(COMPILE) 336 337 dtutils.o : $(ASL_COMPILER)/dtutils.c 338 $(COMPILE) 339 340 # 341 # ACPICA core source - common 342 # 343 adfile.o : $(ACPICA_COMMON)/adfile.c 344 $(COMPILE) 345 346 adisasm.o : $(ACPICA_COMMON)/adisasm.c 347 $(COMPILE) 348 349 adwalk.o : $(ACPICA_COMMON)/adwalk.c 350 $(COMPILE) 351 352 dmextern.o : $(ACPICA_COMMON)/dmextern.c 353 $(COMPILE) 354 355 dmrestag.o : $(ACPICA_COMMON)/dmrestag.c 356 $(COMPILE) 357 358 dmtable.o : $(ACPICA_COMMON)/dmtable.c 359 $(COMPILE) 360 361 dmtbdump.o : $(ACPICA_COMMON)/dmtbdump.c 362 $(COMPILE) 363 364 dmtbinfo.o : $(ACPICA_COMMON)/dmtbinfo.c 365 $(COMPILE) 366 367 getopt.o : $(ACPICA_COMMON)/getopt.c 368 $(COMPILE) 369 370 # 371 # ACPICA core source 372 # 373 dbfileio.o : $(ACPICA_CORE)/debugger/dbfileio.c 374 $(COMPILE) 375 376 dmbuffer.o : $(ACPICA_CORE)/disassembler/dmbuffer.c 377 $(COMPILE) 378 379 dmnames.o : $(ACPICA_CORE)/disassembler/dmnames.c 380 $(COMPILE) 381 382 dmobject.o : $(ACPICA_CORE)/disassembler/dmobject.c 383 $(COMPILE) 384 385 dmopcode.o : $(ACPICA_CORE)/disassembler/dmopcode.c 386 $(COMPILE) 387 388 dmresrc.o : $(ACPICA_CORE)/disassembler/dmresrc.c 389 $(COMPILE) 390 391 dmresrcl.o : $(ACPICA_CORE)/disassembler/dmresrcl.c 392 $(COMPILE) 393 394 dmresrcs.o : $(ACPICA_CORE)/disassembler/dmresrcs.c 395 $(COMPILE) 396 397 dmutils.o : $(ACPICA_CORE)/disassembler/dmutils.c 398 $(COMPILE) 399 400 dmwalk.o : $(ACPICA_CORE)/disassembler/dmwalk.c 401 $(COMPILE) 402 403 dsargs.o : $(ACPICA_CORE)/dispatcher/dsargs.c 404 $(COMPILE) 405 406 dscontrol.o : $(ACPICA_CORE)/dispatcher/dscontrol.c 407 $(COMPILE) 408 409 dsfield.o : $(ACPICA_CORE)/dispatcher/dsfield.c 410 $(COMPILE) 411 412 dsobject.o : $(ACPICA_CORE)/dispatcher/dsobject.c 413 $(COMPILE) 414 415 dsopcode.o : $(ACPICA_CORE)/dispatcher/dsopcode.c 416 $(COMPILE) 417 418 dsutils.o : $(ACPICA_CORE)/dispatcher/dsutils.c 419 $(COMPILE) 420 421 dswexec.o : $(ACPICA_CORE)/dispatcher/dswexec.c 422 $(COMPILE) 423 424 dswload.o : $(ACPICA_CORE)/dispatcher/dswload.c 425 $(COMPILE) 426 427 dswload2.o : $(ACPICA_CORE)/dispatcher/dswload2.c 428 $(COMPILE) 429 430 dswscope.o : $(ACPICA_CORE)/dispatcher/dswscope.c 431 $(COMPILE) 432 433 dswstate.o : $(ACPICA_CORE)/dispatcher/dswstate.c 434 $(COMPILE) 435 436 exconvrt.o : $(ACPICA_CORE)/executer/exconvrt.c 437 $(COMPILE) 438 439 excreate.o : $(ACPICA_CORE)/executer/excreate.c 440 $(COMPILE) 441 442 exdump.o : $(ACPICA_CORE)/executer/exdump.c 443 $(COMPILE) 444 445 exmisc.o : $(ACPICA_CORE)/executer/exmisc.c 446 $(COMPILE) 447 448 exmutex.o : $(ACPICA_CORE)/executer/exmutex.c 449 $(COMPILE) 450 451 exnames.o : $(ACPICA_CORE)/executer/exnames.c 452 $(COMPILE) 453 454 exoparg1.o : $(ACPICA_CORE)/executer/exoparg1.c 455 $(COMPILE) 456 457 exoparg2.o : $(ACPICA_CORE)/executer/exoparg2.c 458 $(COMPILE) 459 460 exoparg3.o : $(ACPICA_CORE)/executer/exoparg3.c 461 $(COMPILE) 462 463 exoparg6.o : $(ACPICA_CORE)/executer/exoparg6.c 464 $(COMPILE) 465 466 exprep.o : $(ACPICA_CORE)/executer/exprep.c 467 $(COMPILE) 468 469 exregion.o : $(ACPICA_CORE)/executer/exregion.c 470 $(COMPILE) 471 472 exresnte.o : $(ACPICA_CORE)/executer/exresnte.c 473 $(COMPILE) 474 475 exresolv.o : $(ACPICA_CORE)/executer/exresolv.c 476 $(COMPILE) 477 478 exresop.o : $(ACPICA_CORE)/executer/exresop.c 479 $(COMPILE) 480 481 exstore.o : $(ACPICA_CORE)/executer/exstore.c 482 $(COMPILE) 483 484 exstoren.o : $(ACPICA_CORE)/executer/exstoren.c 485 $(COMPILE) 486 487 exstorob.o : $(ACPICA_CORE)/executer/exstorob.c 488 $(COMPILE) 489 490 exsystem.o : $(ACPICA_CORE)/executer/exsystem.c 491 $(COMPILE) 492 493 exutils.o : $(ACPICA_CORE)/executer/exutils.c 494 $(COMPILE) 495 496 nsaccess.o : $(ACPICA_CORE)/namespace/nsaccess.c 497 $(COMPILE) 498 499 nsalloc.o : $(ACPICA_CORE)/namespace/nsalloc.c 500 $(COMPILE) 501 502 nsdump.o : $(ACPICA_CORE)/namespace/nsdump.c 503 $(COMPILE) 504 505 nsnames.o : $(ACPICA_CORE)/namespace/nsnames.c 506 $(COMPILE) 507 508 nsobject.o : $(ACPICA_CORE)/namespace/nsobject.c 509 $(COMPILE) 510 511 nsparse.o : $(ACPICA_CORE)/namespace/nsparse.c 512 $(COMPILE) 513 514 nssearch.o : $(ACPICA_CORE)/namespace/nssearch.c 515 $(COMPILE) 516 517 nsutils.o : $(ACPICA_CORE)/namespace/nsutils.c 518 $(COMPILE) 519 520 nswalk.o : $(ACPICA_CORE)/namespace/nswalk.c 521 $(COMPILE) 522 523 nsxfobj.o : $(ACPICA_CORE)/namespace/nsxfobj.c 524 $(COMPILE) 525 526 psargs.o : $(ACPICA_CORE)/parser/psargs.c 527 $(COMPILE) 528 529 psloop.o : $(ACPICA_CORE)/parser/psloop.c 530 $(COMPILE) 531 532 psopcode.o : $(ACPICA_CORE)/parser/psopcode.c 533 $(COMPILE) 534 535 psparse.o : $(ACPICA_CORE)/parser/psparse.c 536 $(COMPILE) 537 538 psscope.o : $(ACPICA_CORE)/parser/psscope.c 539 $(COMPILE) 540 541 pstree.o : $(ACPICA_CORE)/parser/pstree.c 542 $(COMPILE) 543 544 psutils.o : $(ACPICA_CORE)/parser/psutils.c 545 $(COMPILE) 546 547 pswalk.o : $(ACPICA_CORE)/parser/pswalk.c 548 $(COMPILE) 549 550 tbfadt.o : $(ACPICA_CORE)/tables/tbfadt.c 551 $(COMPILE) 552 553 tbinstal.o : $(ACPICA_CORE)/tables/tbinstal.c 554 $(COMPILE) 555 556 tbutils.o : $(ACPICA_CORE)/tables/tbutils.c 557 $(COMPILE) 558 559 tbxface.o : $(ACPICA_CORE)/tables/tbxface.c 560 $(COMPILE) 561 562 utalloc.o : $(ACPICA_CORE)/utilities/utalloc.c 563 $(COMPILE) 564 565 utcache.o : $(ACPICA_CORE)/utilities/utcache.c 566 $(COMPILE) 567 568 utcopy.o : $(ACPICA_CORE)/utilities/utcopy.c 569 $(COMPILE) 570 571 utdebug.o : $(ACPICA_CORE)/utilities/utdebug.c 572 $(COMPILE) 573 574 utdecode.o : $(ACPICA_CORE)/utilities/utdecode.c 575 $(COMPILE) 576 577 utdelete.o : $(ACPICA_CORE)/utilities/utdelete.c 578 $(COMPILE) 579 580 utglobal.o : $(ACPICA_CORE)/utilities/utglobal.c 581 $(COMPILE) 582 583 utinit.o : $(ACPICA_CORE)/utilities/utinit.c 584 $(COMPILE) 585 586 utlock.o : $(ACPICA_CORE)/utilities/utlock.c 587 $(COMPILE) 588 589 utmath.o : $(ACPICA_CORE)/utilities/utmath.c 590 $(COMPILE) 591 592 utmisc.o : $(ACPICA_CORE)/utilities/utmisc.c 593 $(COMPILE) 594 595 utmutex.o : $(ACPICA_CORE)/utilities/utmutex.c 596 $(COMPILE) 597 598 utobject.o : $(ACPICA_CORE)/utilities/utobject.c 599 $(COMPILE) 600 601 utresrc.o : $(ACPICA_CORE)/utilities/utresrc.c 602 $(COMPILE) 603 604 utstate.o : $(ACPICA_CORE)/utilities/utstate.c 605 $(COMPILE) 606 607 utxferror.o : $(ACPICA_CORE)/utilities/utxferror.c 608 $(COMPILE) 609 610 utxface.o : $(ACPICA_CORE)/utilities/utxface.c 611 $(COMPILE) 612 613 # 614 # Unix OS services layer (OSL) 615 # 616 osunixxf.o : $(ACPICA_OSL)/osunixxf.c 617 $(COMPILE) 618 619 620 clean : 621 rm -f $(PROG) $(PROG).exe $(OBJS) $(INTERMEDIATES) $(MISC) 622 623 install : 624 $(INSTALLPROG) 625