1 # 2 # This file and its contents are supplied under the terms of the 3 # Common Development and Distribution License ("CDDL"), version 1.0. 4 # You may only use this file in accordance with the terms of version 5 # 1.0 of the CDDL. 6 # 7 # A full copy of the text of the CDDL should have accompanied this 8 # source. A copy of the CDDL is also available via the Internet at 9 # http://www.illumos.org/license/CDDL. 10 # 11 12 # 13 # Copyright 2013 Nexenta Systems, Inc. All rights reserved. 14 # 15 16 PROG= iasl 17 # common 18 OBJS += adfile.o adisasm.o adwalk.o dmextern.o \ 19 dmrestag.o dmtable.o dmtbdump.o dmtbinfo.o getopt.o \ 20 ahpredef.o 21 # compiler (generated) 22 OBJS += aslcompilerparse.o aslcompilerlex.o dtparserparse.o \ 23 dtparserlex.o prexpress.o prmacros.o prscan.o prutils.o \ 24 prparserparse.o prparserlex.o 25 # compiler 26 OBJS += aslanalyze.o aslbtypes.o aslcodegen.o aslcompile.o \ 27 aslerror.o aslfiles.o aslfold.o asllength.o \ 28 asllisting.o aslload.o asllookup.o aslmain.o aslmap.o \ 29 aslopcodes.o asloperands.o aslopt.o aslpredef.o \ 30 aslresource.o aslrestype1.o aslrestype1i.o \ 31 aslrestype2.o aslrestype2d.o aslrestype2e.o \ 32 aslrestype2q.o aslrestype2w.o aslstartup.o aslstubs.o \ 33 asltransform.o asltree.o aslutils.o asluuid.o \ 34 aslwalks.o dtcompile.o dtexpress.o dtfield.o dtio.o \ 35 dtsubtable.o dttable.o dttemplate.o dtutils.o aslfileio.o \ 36 aslhex.o asllistsup.o aslmethod.o aslnamesp.o asloffset.o \ 37 asloptions.o aslprepkg.o aslrestype2s.o aslxref.o 38 # components/debugger 39 OBJS += dbfileio.o 40 # components/disassembler 41 OBJS += dmbuffer.o dmnames.o dmopcode.o dmresrc.o dmresrcl.o \ 42 dmresrcs.o dmutils.o dmwalk.o dmdeferred.o dmobject.o \ 43 dmresrcl2.o 44 45 # components/dispatcher 46 OBJS += dsargs.o dscontrol.o dsfield.o dsobject.o dsopcode.o \ 47 dsutils.o dswexec.o dswload.o dswload2.o dswscope.o \ 48 dswstate.o 49 # components/executer 50 OBJS += exconvrt.o excreate.o exdump.o exmisc.o exmutex.o \ 51 exnames.o exoparg1.o exoparg2.o exoparg3.o exoparg6.o \ 52 exprep.o exresnte.o exresolv.o exresop.o exstore.o \ 53 exstoren.o exstorob.o exsystem.o exutils.o exregion.o 54 # components/namespace 55 OBJS += nsaccess.o nsalloc.o nsdump.o nsnames.o nsobject.o \ 56 nsparse.o nssearch.o nsutils.o nswalk.o nsxfobj.o 57 # components/parser 58 OBJS += psargs.o psloop.o psopcode.o psparse.o psscope.o \ 59 pstree.o psutils.o pswalk.o psobject.o psopinfo.o 60 # components/tables 61 OBJS += tbfadt.o tbinstal.o tbutils.o tbxface.o tbprint.o 62 # components/utilities 63 OBJS += utalloc.o utcache.o utcopy.o utdebug.o utdecode.o \ 64 utdelete.o utglobal.o utinit.o utlock.o utmath.o \ 65 utmisc.o utmutex.o utobject.o utresrc.o utstate.o \ 66 utxface.o utxferror.o utaddress.o utbuffer.o uterror.o \ 67 utexcep.o utownerid.o utpredef.o utstring.o 68 69 # os_specific/service_layers 70 OBJS += osunixxf.o 71 72 CLEANFILES= aslcompiler.y.h aslcompilerlex.c aslcompilerparse.c \ 73 dtparser.y.h dtparserlex.c dtparserparse.c prparser.y.h \ 74 prparserlex.c prparserparse.c 75 76 ACPICA= $(SRC)/common/acpica 77 78 include $(SRC)/cmd/Makefile.cmd 79 80 C99MODE= $(C99_ENABLE) 81 CPPFLAGS += -DACPI_ASL_COMPILER -DACPI_USE_STANDARD_HEADERS \ 82 -I$(ACPICA)/include -I$(ACPICA)/compiler -I. 83 84 # Flags for flex and bison 85 LFLAGS= -i -s 86 YFLAGS= -d 87 88 .KEEP_STATE: 89 90 all: $(PROG) 91 92 clean: 93 $(RM) $(CLEANFILES) $(OBJS) 94 95 install: all $(ROOTPROG) 96 97 $(PROG): $(OBJS) 98 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 99 $(POST_PROCESS) 100 101 aslcompilerlex.c: $(ACPICA)/compiler/aslcompiler.l 102 $(FLEX) $(LFLAGS) -PAslCompiler -o$@ $(ACPICA)/compiler/aslcompiler.l 103 104 aslcompilerparse.c: $(ACPICA)/compiler/aslcompiler.y 105 $(BISON) $(YFLAGS) -pAslCompiler -o$@ $(ACPICA)/compiler/aslcompiler.y 106 $(RM) aslcompiler.y.h; $(MV) aslcompilerparse.h aslcompiler.y.h 107 108 dtparserlex.c: $(ACPICA)/compiler/dtparser.l 109 $(FLEX) $(LFLAGS) -PDtParser -o$@ $(ACPICA)/compiler/dtparser.l 110 111 dtparserparse.c: $(ACPICA)/compiler/dtparser.y 112 $(BISON) $(YFLAGS) -pDtParser -o$@ $(ACPICA)/compiler/dtparser.y 113 $(RM) dtparser.y.h; $(MV) dtparserparse.h dtparser.y.h 114 115 prparserlex.c: $(ACPICA)/compiler/prparser.l 116 $(FLEX) $(LFLAGS) -PPrParser -o$@ $(ACPICA)/compiler/prparser.l 117 118 prparserparse.c: $(ACPICA)/compiler/prparser.y 119 $(BISON) $(YFLAGS) -pPrParser -o$@ $(ACPICA)/compiler/prparser.y 120 $(RM) prparser.y.h; $(MV) prparserparse.h prparser.y.h 121 122 123 %.o: $(ACPICA)/common/%.c 124 $(COMPILE.c) -o $@ $< 125 $(POST_PROCESS_O) 126 127 %.o: $(ACPICA)/compiler/%.c 128 $(COMPILE.c) -o $@ $< 129 $(POST_PROCESS_O) 130 131 %.o: $(ACPICA)/components/debugger/%.c 132 $(COMPILE.c) -o $@ $< 133 $(POST_PROCESS_O) 134 135 %.o: $(ACPICA)/components/disassembler/%.c 136 $(COMPILE.c) -o $@ $< 137 $(POST_PROCESS_O) 138 139 %.o: $(ACPICA)/components/dispatcher/%.c 140 $(COMPILE.c) -o $@ $< 141 $(POST_PROCESS_O) 142 143 %.o: $(ACPICA)/components/executer/%.c 144 $(COMPILE.c) -o $@ $< 145 $(POST_PROCESS_O) 146 147 %.o: $(ACPICA)/components/namespace/%.c 148 $(COMPILE.c) -o $@ $< 149 $(POST_PROCESS_O) 150 151 %.o: $(ACPICA)/components/parser/%.c 152 $(COMPILE.c) -o $@ $< 153 $(POST_PROCESS_O) 154 155 %.o: $(ACPICA)/components/tables/%.c 156 $(COMPILE.c) -o $@ $< 157 $(POST_PROCESS_O) 158 159 %.o: $(ACPICA)/components/utilities/%.c 160 $(COMPILE.c) -o $@ $< 161 $(POST_PROCESS_O) 162 163 %.o: $(ACPICA)/os_specific/service_layers/%.c 164 $(COMPILE.c) -o $@ $< 165 $(POST_PROCESS_O) 166 167 include $(SRC)/cmd/Makefile.targ