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