1 # $NetBSD: Makefile,v 1.10 2015/08/18 10:38:31 christos Exp $ 2 3 .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") 4 PROG= iasl 5 .endif 6 BINDIR= /usr/bin 7 MAN= iasl.8 8 WARNS= 0 9 TOPDIR= ${NETBSDSRCDIR}/sys/external/bsd/acpica/dist/compiler 10 11 .include <bsd.own.mk> 12 13 CPPFLAGS+= -I${TOPDIR}/../include -I${TOPDIR} -I. 14 CPPFLAGS+= -D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT 15 CPPFLAGS+= -D_USE_BERKELEY_YACC 16 .if ${MKREPRO:Uno} == "yes" 17 CPPFLAGS+= -DACPI_REPRO 18 .endif 19 LDADD+= -ll -ly -lrt -lpthread 20 DPADD+= ${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD} 21 22 DPSRCS= aslcompiler.y aslcompilerlex.c aslcompilerparse.c \ 23 dtparserparse.c dtparserlex.c prparserparse.c prparserlex.c 24 25 .PATH: ${TOPDIR} 26 SRCS+= \ 27 adfile.c \ 28 aslanalyze.c \ 29 aslascii.c \ 30 aslbtypes.c \ 31 aslcodegen.c \ 32 aslcompile.c \ 33 aslcompilerlex.c \ 34 aslcompilerparse.c \ 35 aslerror.c \ 36 aslfileio.c \ 37 aslfiles.c \ 38 aslfold.c \ 39 aslhex.c \ 40 asllength.c \ 41 asllisting.c \ 42 asllistsup.c \ 43 aslload.c \ 44 asllookup.c \ 45 aslmain.c \ 46 aslmap.c \ 47 aslmapenter.c \ 48 aslmapoutput.c \ 49 aslmaputils.c \ 50 aslmessages.c \ 51 aslmethod.c \ 52 aslnamesp.c \ 53 asloffset.c \ 54 aslopcodes.c \ 55 asloperands.c \ 56 aslopt.c \ 57 asloptions.c \ 58 aslpredef.c \ 59 aslprepkg.c \ 60 aslprintf.c \ 61 aslprune.c \ 62 aslresource.c \ 63 aslrestype1.c \ 64 aslrestype1i.c \ 65 aslrestype2.c \ 66 aslrestype2d.c \ 67 aslrestype2e.c \ 68 aslrestype2q.c \ 69 aslrestype2s.c \ 70 aslrestype2w.c \ 71 aslstartup.c \ 72 aslstubs.c \ 73 asltransform.c \ 74 asltree.c \ 75 aslutils.c \ 76 asluuid.c \ 77 aslwalks.c \ 78 aslxref.c \ 79 dtcompile.c \ 80 dtexpress.c \ 81 dtfield.c \ 82 dtio.c \ 83 dtparserlex.c \ 84 dtparserparse.c \ 85 dtsubtable.c \ 86 dttable.c \ 87 dttemplate.c \ 88 dtutils.c \ 89 prexpress.c \ 90 prmacros.c \ 91 prparserlex.c \ 92 prparserparse.c \ 93 prscan.c \ 94 prutils.c 95 96 .PATH: ${TOPDIR}/../common 97 SRCS+= \ 98 adisasm.c \ 99 adwalk.c \ 100 ahids.c \ 101 ahpredef.c \ 102 ahtable.c \ 103 ahuuids.c \ 104 cmfsize.c \ 105 dmextern.c \ 106 dmrestag.c \ 107 dmtable.c \ 108 dmtbdump.c \ 109 dmtbinfo.c \ 110 getopt.c 111 112 .PATH: ${TOPDIR}/../debugger 113 SRCS+= dbfileio.c 114 115 .PATH: ${TOPDIR}/../disassembler 116 SRCS+= \ 117 dmbuffer.c \ 118 dmcstyle.c \ 119 dmdeferred.c \ 120 dmnames.c \ 121 dmopcode.c \ 122 dmresrc.c \ 123 dmresrcl.c \ 124 dmresrcl2.c \ 125 dmresrcs.c \ 126 dmutils.c \ 127 dmwalk.c 128 129 .PATH: ${TOPDIR}/../dispatcher 130 SRCS+= \ 131 dsargs.c \ 132 dscontrol.c \ 133 dsfield.c \ 134 dsobject.c \ 135 dsopcode.c \ 136 dsutils.c \ 137 dswexec.c \ 138 dswload.c \ 139 dswload2.c \ 140 dswscope.c \ 141 dswstate.c 142 143 .PATH: ${TOPDIR}/../executer 144 SRCS+= \ 145 exconvrt.c \ 146 excreate.c \ 147 exdump.c \ 148 exmisc.c \ 149 exmutex.c \ 150 exnames.c \ 151 exoparg1.c \ 152 exoparg2.c \ 153 exoparg3.c \ 154 exoparg6.c \ 155 exprep.c \ 156 exregion.c \ 157 exresnte.c \ 158 exresolv.c \ 159 exresop.c \ 160 exstore.c \ 161 exstoren.c \ 162 exstorob.c \ 163 exsystem.c \ 164 exutils.c 165 166 .PATH: ${TOPDIR}/../parser 167 SRCS+= \ 168 psargs.c \ 169 psloop.c \ 170 psobject.c \ 171 psopcode.c \ 172 psopinfo.c \ 173 psparse.c \ 174 psscope.c \ 175 pstree.c \ 176 psutils.c \ 177 pswalk.c 178 179 .PATH: ${TOPDIR}/../tables 180 SRCS+= \ 181 tbfadt.c \ 182 tbdata.c \ 183 tbinstal.c \ 184 tbprint.c \ 185 tbutils.c \ 186 tbxface.c 187 188 .PATH: ${TOPDIR}/../namespace 189 SRCS+= \ 190 nsaccess.c \ 191 nsalloc.c \ 192 nsdump.c \ 193 nsnames.c \ 194 nsobject.c \ 195 nsparse.c \ 196 nssearch.c \ 197 nsutils.c \ 198 nswalk.c \ 199 nsxfobj.c \ 200 201 .PATH: ${TOPDIR}/../utilities 202 SRCS+= \ 203 utaddress.c \ 204 utalloc.c \ 205 utbuffer.c \ 206 utcache.c \ 207 utcopy.c \ 208 utdebug.c \ 209 utdecode.c \ 210 utdelete.c \ 211 uterror.c \ 212 utexcep.c \ 213 utfileio.c \ 214 utglobal.c \ 215 uthex.c \ 216 utinit.c \ 217 utlock.c \ 218 utmath.c \ 219 utmisc.c \ 220 utmutex.c \ 221 utnonansi.c \ 222 utobject.c \ 223 utosi.c \ 224 utownerid.c \ 225 utpredef.c \ 226 utprint.c \ 227 utresrc.c \ 228 utstate.c \ 229 utstring.c \ 230 utuuid.c \ 231 utxface.c \ 232 utxferror.c 233 234 .PATH: ${TOPDIR}/../os_specific/service_layers 235 SRCS+= osunixxf.c oslibcfs.c 236 237 238 aslparser.y: asltokens.y asltypes.y aslrules.y aslsupport.y 239 240 aslcompiler.y: aslparser.y 241 ${TOOL_M4} -P -I${TOPDIR} ${.ALLSRC} > ${.TARGET} 242 243 aslcompiler.y.h aslcompilerparse.c: aslcompiler.y 244 ${YACC} -v -d -o${.TARGET} -pAslCompiler ${.ALLSRC} 245 mv -f ${.PREFIX}.h aslcompiler.y.h 246 247 aslcompilerlex.c: ${TOPDIR}/aslcompiler.l 248 ${LEX} -i -PAslCompiler -o${.TARGET} ${.ALLSRC} 249 250 aslcompilerlex.o: aslcompiler.y.h 251 252 dtparser.y.h dtparserparse.c: ${TOPDIR}/dtparser.y 253 ${YACC} -v -d -o${.TARGET} -pDtParser ${.ALLSRC} 254 mv -f ${.PREFIX}.h dtparser.y.h 255 256 dtparserlex.c: ${TOPDIR}/dtparser.l 257 ${LEX} -i -PDtParser -o${.TARGET} ${.ALLSRC} 258 259 dtparserlex.o: dtparser.y.h 260 261 prparser.y.h prparserparse.c: ${TOPDIR}/prparser.y 262 ${YACC} -v -d -o${.TARGET} -pPrParser ${.ALLSRC} 263 mv -f ${.PREFIX}.h prparser.y.h 264 265 prparserlex.c: ${TOPDIR}/prparser.l 266 ${LEX} -i -PPrParser -o${.TARGET} ${.ALLSRC} 267 268 prparserlex.o: prparser.y.h 269 270 CLEANFILES+= aslcompiler.y \ 271 aslcompilerlex.c aslcompilerparse.c \ 272 aslcompiler.y.h aslcompilerparse.output \ 273 dtparserlex.c dtparserparse.c \ 274 dtparser.y.h dtparserparse.output \ 275 prparserlex.c prparserparse.c \ 276 prparser.y.h prparserparse.output \ 277 278 .include <bsd.prog.mk> 279