Home | History | Annotate | Line # | Download | only in iasl
Makefile revision 1.1.1.6
      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 FINAL_PROG = ../$(BINDIR)/iasl
     15 PROG = $(OBJDIR)/iasl
     16 
     17 #
     18 # Search paths for source files
     19 #
     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)
     32 
     33 HEADERS = \
     34     $(wildcard $(ASL_COMPILER)/*.h)\
     35     $(OBJDIR)/aslcompiler.y.h\
     36     $(OBJDIR)/dtparser.y.h\
     37     $(OBJDIR)/prparser.y.h
     38 
     39 OBJECTS = \
     40 	$(OBJDIR)/aslcompilerlex.o\
     41 	$(OBJDIR)/aslcompilerparse.o\
     42 	$(OBJDIR)/dtparserlex.o\
     43 	$(OBJDIR)/dtparserparse.o\
     44 	$(OBJDIR)/prparserlex.o\
     45 	$(OBJDIR)/prparserparse.o\
     46 	$(OBJDIR)/adfile.o\
     47 	$(OBJDIR)/adisasm.o\
     48 	$(OBJDIR)/adwalk.o\
     49 	$(OBJDIR)/ahids.o\
     50 	$(OBJDIR)/ahpredef.o\
     51 	$(OBJDIR)/ahtable.o\
     52 	$(OBJDIR)/ahuuids.o\
     53 	$(OBJDIR)/aslanalyze.o\
     54 	$(OBJDIR)/aslascii.o\
     55 	$(OBJDIR)/aslbtypes.o\
     56 	$(OBJDIR)/aslcodegen.o\
     57 	$(OBJDIR)/aslcompile.o\
     58 	$(OBJDIR)/aslerror.o\
     59 	$(OBJDIR)/aslfiles.o\
     60 	$(OBJDIR)/aslfileio.o\
     61 	$(OBJDIR)/aslfold.o\
     62 	$(OBJDIR)/aslhex.o\
     63 	$(OBJDIR)/asllength.o\
     64 	$(OBJDIR)/asllisting.o\
     65 	$(OBJDIR)/asllistsup.o\
     66 	$(OBJDIR)/aslload.o\
     67 	$(OBJDIR)/asllookup.o\
     68 	$(OBJDIR)/aslmain.o\
     69 	$(OBJDIR)/aslmap.o\
     70 	$(OBJDIR)/aslmapenter.o\
     71 	$(OBJDIR)/aslmapoutput.o\
     72 	$(OBJDIR)/aslmaputils.o\
     73 	$(OBJDIR)/aslmessages.o\
     74 	$(OBJDIR)/aslmethod.o\
     75 	$(OBJDIR)/aslnamesp.o\
     76 	$(OBJDIR)/asloffset.o\
     77 	$(OBJDIR)/aslopcodes.o\
     78 	$(OBJDIR)/asloperands.o\
     79 	$(OBJDIR)/aslopt.o\
     80 	$(OBJDIR)/asloptions.o\
     81 	$(OBJDIR)/aslpredef.o\
     82 	$(OBJDIR)/aslprepkg.o\
     83 	$(OBJDIR)/aslprintf.o\
     84 	$(OBJDIR)/aslprune.o\
     85 	$(OBJDIR)/aslresource.o\
     86 	$(OBJDIR)/aslrestype1.o\
     87 	$(OBJDIR)/aslrestype1i.o\
     88 	$(OBJDIR)/aslrestype2.o\
     89 	$(OBJDIR)/aslrestype2d.o\
     90 	$(OBJDIR)/aslrestype2e.o\
     91 	$(OBJDIR)/aslrestype2q.o\
     92 	$(OBJDIR)/aslrestype2s.o\
     93 	$(OBJDIR)/aslrestype2w.o\
     94 	$(OBJDIR)/aslstartup.o\
     95 	$(OBJDIR)/aslstubs.o\
     96 	$(OBJDIR)/asltransform.o\
     97 	$(OBJDIR)/asltree.o\
     98 	$(OBJDIR)/aslutils.o\
     99 	$(OBJDIR)/asluuid.o\
    100 	$(OBJDIR)/aslwalks.o\
    101 	$(OBJDIR)/aslxref.o\
    102 	$(OBJDIR)/cmfsize.o\
    103 	$(OBJDIR)/dbfileio.o\
    104 	$(OBJDIR)/dmbuffer.o\
    105 	$(OBJDIR)/dmcstyle.o\
    106 	$(OBJDIR)/dmdeferred.o\
    107 	$(OBJDIR)/dmextern.o\
    108 	$(OBJDIR)/dmnames.o\
    109 	$(OBJDIR)/dmopcode.o\
    110 	$(OBJDIR)/dmresrc.o\
    111 	$(OBJDIR)/dmresrcl.o\
    112 	$(OBJDIR)/dmresrcl2.o\
    113 	$(OBJDIR)/dmresrcs.o\
    114 	$(OBJDIR)/dmrestag.o\
    115 	$(OBJDIR)/dmtable.o\
    116 	$(OBJDIR)/dmtbdump.o\
    117 	$(OBJDIR)/dmtbinfo.o\
    118 	$(OBJDIR)/dmutils.o\
    119 	$(OBJDIR)/dmwalk.o\
    120 	$(OBJDIR)/dsargs.o\
    121 	$(OBJDIR)/dscontrol.o\
    122 	$(OBJDIR)/dsfield.o\
    123 	$(OBJDIR)/dsobject.o\
    124 	$(OBJDIR)/dsopcode.o\
    125 	$(OBJDIR)/dsutils.o\
    126 	$(OBJDIR)/dswexec.o\
    127 	$(OBJDIR)/dswload.o\
    128 	$(OBJDIR)/dswload2.o\
    129 	$(OBJDIR)/dswscope.o\
    130 	$(OBJDIR)/dswstate.o\
    131 	$(OBJDIR)/dtcompile.o\
    132 	$(OBJDIR)/dtexpress.o\
    133 	$(OBJDIR)/dtfield.o\
    134 	$(OBJDIR)/dtio.o\
    135 	$(OBJDIR)/dtsubtable.o\
    136 	$(OBJDIR)/dttable.o\
    137 	$(OBJDIR)/dttemplate.o\
    138 	$(OBJDIR)/dtutils.o\
    139 	$(OBJDIR)/exconvrt.o\
    140 	$(OBJDIR)/excreate.o\
    141 	$(OBJDIR)/exdump.o\
    142 	$(OBJDIR)/exmisc.o\
    143 	$(OBJDIR)/exmutex.o\
    144 	$(OBJDIR)/exnames.o\
    145 	$(OBJDIR)/exoparg1.o\
    146 	$(OBJDIR)/exoparg2.o\
    147 	$(OBJDIR)/exoparg3.o\
    148 	$(OBJDIR)/exoparg6.o\
    149 	$(OBJDIR)/exprep.o\
    150 	$(OBJDIR)/exregion.o\
    151 	$(OBJDIR)/exresnte.o\
    152 	$(OBJDIR)/exresolv.o\
    153 	$(OBJDIR)/exresop.o\
    154 	$(OBJDIR)/exstore.o\
    155 	$(OBJDIR)/exstoren.o\
    156 	$(OBJDIR)/exstorob.o\
    157 	$(OBJDIR)/exsystem.o\
    158 	$(OBJDIR)/exutils.o\
    159 	$(OBJDIR)/getopt.o\
    160 	$(OBJDIR)/nsaccess.o\
    161 	$(OBJDIR)/nsalloc.o\
    162 	$(OBJDIR)/nsdump.o\
    163 	$(OBJDIR)/nsnames.o\
    164 	$(OBJDIR)/nsobject.o\
    165 	$(OBJDIR)/nsparse.o\
    166 	$(OBJDIR)/nssearch.o\
    167 	$(OBJDIR)/nsutils.o\
    168 	$(OBJDIR)/nswalk.o\
    169 	$(OBJDIR)/nsxfobj.o\
    170 	$(OBJDIR)/osunixxf.o\
    171 	$(OBJDIR)/oslibcfs.o\
    172 	$(OBJDIR)/prexpress.o\
    173 	$(OBJDIR)/prmacros.o\
    174 	$(OBJDIR)/prscan.o\
    175 	$(OBJDIR)/prutils.o\
    176 	$(OBJDIR)/psargs.o\
    177 	$(OBJDIR)/psloop.o\
    178 	$(OBJDIR)/psobject.o\
    179 	$(OBJDIR)/psopcode.o\
    180 	$(OBJDIR)/psopinfo.o\
    181 	$(OBJDIR)/psparse.o\
    182 	$(OBJDIR)/psscope.o\
    183 	$(OBJDIR)/pstree.o\
    184 	$(OBJDIR)/psutils.o\
    185 	$(OBJDIR)/pswalk.o\
    186 	$(OBJDIR)/tbdata.o\
    187 	$(OBJDIR)/tbfadt.o\
    188 	$(OBJDIR)/tbinstal.o\
    189 	$(OBJDIR)/tbprint.o\
    190 	$(OBJDIR)/tbutils.o\
    191 	$(OBJDIR)/tbxface.o\
    192 	$(OBJDIR)/utaddress.o\
    193 	$(OBJDIR)/utalloc.o\
    194 	$(OBJDIR)/utbuffer.o\
    195 	$(OBJDIR)/utcache.o\
    196 	$(OBJDIR)/utcopy.o\
    197 	$(OBJDIR)/utdebug.o\
    198 	$(OBJDIR)/utdecode.o\
    199 	$(OBJDIR)/utdelete.o\
    200 	$(OBJDIR)/uterror.o\
    201 	$(OBJDIR)/utexcep.o\
    202 	$(OBJDIR)/utfileio.o\
    203 	$(OBJDIR)/utglobal.o\
    204 	$(OBJDIR)/uthex.o\
    205 	$(OBJDIR)/utinit.o\
    206 	$(OBJDIR)/utlock.o\
    207 	$(OBJDIR)/utmath.o\
    208 	$(OBJDIR)/utmisc.o\
    209 	$(OBJDIR)/utmutex.o\
    210 	$(OBJDIR)/utnonansi.o\
    211 	$(OBJDIR)/utobject.o\
    212 	$(OBJDIR)/utownerid.o\
    213 	$(OBJDIR)/utpredef.o\
    214 	$(OBJDIR)/utprint.o\
    215 	$(OBJDIR)/utresrc.o\
    216 	$(OBJDIR)/utstate.o\
    217 	$(OBJDIR)/utstring.o\
    218 	$(OBJDIR)/utuuid.o\
    219 	$(OBJDIR)/utxface.o\
    220 	$(OBJDIR)/utxferror.o
    221 
    222 INTERMEDIATES = \
    223 	$(OBJDIR)/aslcompiler.y\
    224 	$(OBJDIR)/aslcompilerlex.c\
    225 	$(OBJDIR)/aslcompilerparse.c\
    226 	$(OBJDIR)/dtparserlex.c\
    227 	$(OBJDIR)/dtparserparse.c\
    228 	$(OBJDIR)/prparserlex.c\
    229 	$(OBJDIR)/prparserparse.c
    230 
    231 MISC = \
    232 	$(OBJDIR)/aslcompiler.y.h\
    233 	$(OBJDIR)/dtparser.y.h\
    234 	$(OBJDIR)/prparser.y.h
    235 
    236 ASL_PARSER = \
    237 	$(ASL_COMPILER)/aslparser.y\
    238 	$(ASL_COMPILER)/aslsupport.y\
    239 	$(ASL_COMPILER)/asltokens.y\
    240 	$(ASL_COMPILER)/asltypes.y\
    241 	$(ASL_COMPILER)/aslrules.y
    242 
    243 ASL_LEXER = \
    244 	$(ASL_COMPILER)/aslcompiler.l\
    245 	$(ASL_COMPILER)/aslsupport.l\
    246 	$(OBJDIR)/aslcompiler.y.h
    247 
    248 
    249 #
    250 # Flags specific to iASL compiler
    251 #
    252 CFLAGS += \
    253     -DACPI_ASL_COMPILER\
    254     -I$(ASL_COMPILER)\
    255     -I$(OBJDIR)
    256 
    257 #
    258 # Common Rules
    259 #
    260 include ../Makefile.rules
    261 
    262 #
    263 # Macro processing for iASL .y files
    264 #
    265 $(OBJDIR)/aslcompiler.y :      $(ASL_PARSER)
    266 	$(MACROPROC) $(MFLAGS) $(ASL_COMPILER)/aslparser.y > $(OBJDIR)/aslcompiler.y
    267 
    268 #
    269 # Parser and Lexer - intermediate C files
    270 #
    271 $(OBJDIR)/aslcompilerlex.c :   $(ASL_LEXER)
    272 	$(LEX) $(LFLAGS) -PAslCompiler -o$@ $(ASL_COMPILER)/aslcompiler.l
    273 
    274 $(OBJDIR)/aslcompiler.y.h :    $(OBJDIR)/aslcompiler.y
    275 	$(YACC) $(YFLAGS) -pAslCompiler -o/dev/null --defines=$@ $<
    276 
    277 $(OBJDIR)/aslcompilerparse.c : $(OBJDIR)/aslcompiler.y
    278 	$(YACC) $(YFLAGS) -pAslCompiler -o$@ --defines=/dev/null $<
    279 
    280 $(OBJDIR)/dtparserlex.c :      $(ASL_COMPILER)/dtparser.l $(OBJDIR)/dtparser.y.h
    281 	$(LEX) $(LFLAGS) -PDtParser -o$@ $<
    282 
    283 $(OBJDIR)/dtparser.y.h :       $(ASL_COMPILER)/dtparser.y
    284 	$(YACC) $(YFLAGS) -pDtParser -o/dev/null --defines=$@ $<
    285 
    286 $(OBJDIR)/dtparserparse.c :    $(ASL_COMPILER)/dtparser.y
    287 	$(YACC) $(YFLAGS) -pDtParser -o$@ --defines=/dev/null $<
    288 
    289 $(OBJDIR)/prparserlex.c :      $(ASL_COMPILER)/prparser.l $(OBJDIR)/prparser.y.h
    290 	$(LEX) $(LFLAGS) -PPrParser -o$@ $<
    291 
    292 $(OBJDIR)/prparser.y.h :       $(ASL_COMPILER)/prparser.y
    293 	$(YACC) $(YFLAGS) -pPrParser -o/dev/null --defines=$@ $<
    294 
    295 $(OBJDIR)/prparserparse.c :    $(ASL_COMPILER)/prparser.y
    296 	$(YACC) $(YFLAGS) -pPrParser -o$@ --defines=/dev/null $<
    297 
    298 
    299 #
    300 # Parsers and Lexers - final object files
    301 #
    302 # Cannot use the common compile warning flags since the C files are created
    303 # by the utilities above and they are not necessarily ANSI C, etc.
    304 #
    305 $(OBJDIR)/aslcompilerlex.o :   $(OBJDIR)/aslcompilerlex.c
    306 	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
    307 
    308 $(OBJDIR)/aslcompilerparse.o : $(OBJDIR)/aslcompilerparse.c
    309 	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
    310 
    311 $(OBJDIR)/dtparserlex.o :      $(OBJDIR)/dtparserlex.c
    312 	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
    313 
    314 $(OBJDIR)/dtparserparse.o :    $(OBJDIR)/dtparserparse.c
    315 	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
    316 
    317 $(OBJDIR)/prparserlex.o :      $(OBJDIR)/prparserlex.c
    318 	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
    319 
    320 $(OBJDIR)/prparserparse.o :    $(OBJDIR)/prparserparse.c
    321 	$(CC) -c $(CFLAGS) -Wall -Werror -o$@ $<
    322