1 # $NetBSD: Makefile,v 1.21.2.1 2019/06/10 21:42:47 christos Exp $ 2 3 .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "aarch64") 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+= -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT 15 .if ${MKREPRO:Uno} == "yes" 16 CPPFLAGS+= -DACPI_REPRO 17 .endif 18 LDADD+= -ll -ly 19 DPADD+= ${LIBL} ${LIBY} 20 21 DPSRCS= aslcompilerparse.y aslcompilerlex.c aslcompilerparse.c \ 22 dtparserparse.c dtparserlex.c prparserparse.c prparserlex.c 23 24 .PATH: ${TOPDIR} 25 SRCS+= \ 26 adfile.c \ 27 aslallocate.c \ 28 aslanalyze.c \ 29 aslascii.c \ 30 aslbtypes.c \ 31 aslcache.c \ 32 aslcodegen.c \ 33 aslcompile.c \ 34 aslcompilerlex.c \ 35 aslcompilerparse.c \ 36 asldebug.c \ 37 aslerror.c \ 38 aslexternal.c \ 39 aslfileio.c \ 40 aslfiles.c \ 41 aslfold.c \ 42 aslhelp.c \ 43 aslhex.c \ 44 asllength.c \ 45 asllisting.c \ 46 asllistsup.c \ 47 aslload.c \ 48 asllookup.c \ 49 aslmain.c \ 50 aslmap.c \ 51 aslmapenter.c \ 52 aslmapoutput.c \ 53 aslmaputils.c \ 54 aslmessages.c \ 55 aslmethod.c \ 56 aslnamesp.c \ 57 asloffset.c \ 58 aslopcodes.c \ 59 asloperands.c \ 60 aslopt.c \ 61 asloptions.c \ 62 aslparseop.c \ 63 aslpld.c \ 64 aslpredef.c \ 65 aslprepkg.c \ 66 aslprintf.c \ 67 aslprune.c \ 68 aslresource.c \ 69 aslrestype1.c \ 70 aslrestype1i.c \ 71 aslrestype2.c \ 72 aslrestype2d.c \ 73 aslrestype2e.c \ 74 aslrestype2q.c \ 75 aslrestype2s.c \ 76 aslrestype2w.c \ 77 aslstartup.c \ 78 aslstubs.c \ 79 asltransform.c \ 80 asltree.c \ 81 aslutils.c \ 82 asluuid.c \ 83 aslwalks.c \ 84 aslxref.c \ 85 aslxrefout.c \ 86 cvcompiler.c \ 87 cvdisasm.c \ 88 cvparser.c \ 89 dtcompile.c \ 90 dtexpress.c \ 91 dtfield.c \ 92 dtio.c \ 93 dtparserlex.c \ 94 dtparserparse.c \ 95 dtsubtable.c \ 96 dttable.c \ 97 dttable1.c \ 98 dttable2.c \ 99 dttemplate.c \ 100 dtutils.c \ 101 prexpress.c \ 102 prmacros.c \ 103 prparserlex.c \ 104 prparserparse.c \ 105 prscan.c \ 106 prutils.c 107 108 .PATH: ${TOPDIR}/../common 109 SRCS+= \ 110 acfileio.c \ 111 adisasm.c \ 112 adwalk.c \ 113 ahids.c \ 114 ahpredef.c \ 115 ahtable.c \ 116 ahuuids.c \ 117 cmfsize.c \ 118 dmextern.c \ 119 dmrestag.c \ 120 dmswitch.c \ 121 dmtable.c \ 122 dmtables.c \ 123 dmtbdump.c \ 124 dmtbdump1.c \ 125 dmtbdump2.c \ 126 dmtbdump3.c \ 127 dmtbinfo.c \ 128 dmtbinfo1.c \ 129 dmtbinfo2.c \ 130 dmtbinfo3.c \ 131 getopt.c 132 133 .PATH: ${TOPDIR}/../debugger 134 SRCS+= dbfileio.c 135 136 .PATH: ${TOPDIR}/../disassembler 137 SRCS+= \ 138 dmbuffer.c \ 139 dmcstyle.c \ 140 dmdeferred.c \ 141 dmnames.c \ 142 dmopcode.c \ 143 dmresrc.c \ 144 dmresrcl.c \ 145 dmresrcl2.c \ 146 dmresrcs.c \ 147 dmutils.c \ 148 dmwalk.c 149 150 .PATH: ${TOPDIR}/../dispatcher 151 SRCS+= \ 152 dsargs.c \ 153 dscontrol.c \ 154 dsfield.c \ 155 dsobject.c \ 156 dsopcode.c \ 157 dspkginit.c \ 158 dsutils.c \ 159 dswexec.c \ 160 dswload.c \ 161 dswload2.c \ 162 dswscope.c \ 163 dswstate.c 164 165 .PATH: ${TOPDIR}/../executer 166 SRCS+= \ 167 exconvrt.c \ 168 excreate.c \ 169 exconcat.c \ 170 exdump.c \ 171 exmisc.c \ 172 exmutex.c \ 173 exnames.c \ 174 exoparg1.c \ 175 exoparg2.c \ 176 exoparg3.c \ 177 exoparg6.c \ 178 exprep.c \ 179 exregion.c \ 180 exresnte.c \ 181 exresolv.c \ 182 exresop.c \ 183 exstore.c \ 184 exstoren.c \ 185 exstorob.c \ 186 exsystem.c \ 187 exutils.c 188 189 .PATH: ${TOPDIR}/../parser 190 SRCS+= \ 191 psargs.c \ 192 psloop.c \ 193 psobject.c \ 194 psopcode.c \ 195 psopinfo.c \ 196 psparse.c \ 197 psscope.c \ 198 pstree.c \ 199 psutils.c \ 200 pswalk.c 201 202 .PATH: ${TOPDIR}/../tables 203 SRCS+= \ 204 tbfadt.c \ 205 tbdata.c \ 206 tbinstal.c \ 207 tbprint.c \ 208 tbutils.c \ 209 tbxface.c \ 210 tbxfload.c 211 212 .PATH: ${TOPDIR}/../namespace 213 SRCS+= \ 214 nsaccess.c \ 215 nsalloc.c \ 216 nsdump.c \ 217 nsnames.c \ 218 nsobject.c \ 219 nsparse.c \ 220 nssearch.c \ 221 nsutils.c \ 222 nswalk.c \ 223 nsxfobj.c \ 224 225 .PATH: ${TOPDIR}/../utilities 226 SRCS+= \ 227 utaddress.c \ 228 utalloc.c \ 229 utascii.c \ 230 utbuffer.c \ 231 utcache.c \ 232 utcopy.c \ 233 utdebug.c \ 234 utdecode.c \ 235 utdelete.c \ 236 uterror.c \ 237 utexcep.c \ 238 utglobal.c \ 239 uthex.c \ 240 utinit.c \ 241 utlock.c \ 242 utmath.c \ 243 utmisc.c \ 244 utmutex.c \ 245 utnonansi.c \ 246 utobject.c \ 247 utosi.c \ 248 utownerid.c \ 249 utpredef.c \ 250 utresdecode.c \ 251 utresrc.c \ 252 utstate.c \ 253 utstring.c \ 254 utstrsuppt.c \ 255 utstrtoul64.c \ 256 utuuid.c \ 257 utxface.c \ 258 utxferror.c 259 260 # utprint.c 261 262 .PATH: ${TOPDIR}/../os_specific/service_layers 263 SRCS+= osunixxf.c 264 265 YHEADER= # Generate headers 266 YFLAGS+=-v # Require debugging 267 LFLAGS+=-i # Case insensitivive parser 268 269 270 # Prevent rules from firing. 271 asltypes.h: asltypes.y 272 @true 273 asltypes.c: asltypes.y 274 @true 275 276 aslparser.y: asltokens.y asltypes.y aslrules.y aslsupport.y 277 278 YPREFIX.aslcompilerparse.y=AslCompiler 279 aslcompilerparse.y: aslparser.y 280 ${TOOL_M4} -P -I${TOPDIR} ${.ALLSRC} > ${.TARGET}.tmp.${.MAKE.PID} \ 281 && mv ${.TARGET}.tmp.${.MAKE.PID} ${.TARGET} 282 283 aslcompiler.y.h: aslcompilerparse.h 284 ln -sf ${.ALLSRC} ${.TARGET} 285 286 LPREFIX.aslcompilerlex.l=AslCompiler 287 aslcompilerlex.l: ${TOPDIR}/aslcompiler.l 288 ln -sf ${.ALLSRC} ${.TARGET} 289 290 291 YPREFIX.dtparserparse.y=DtParser 292 dtparserparse.y: ${TOPDIR}/dtparser.y 293 ln -sf ${.ALLSRC} ${.TARGET} 294 295 dtparser.y.h: dtparserparse.h 296 ln -sf ${.ALLSRC} ${.TARGET} 297 298 LPREFIX.dtparserlex.l=DtParser 299 dtparserlex.l: ${TOPDIR}/dtparser.l 300 ln -sf ${.ALLSRC} ${.TARGET} 301 302 303 YPREFIX.prparserparse.y=PrParser 304 prparserparse.y: ${TOPDIR}/prparser.y 305 ln -sf ${.ALLSRC} ${.TARGET} 306 307 prparser.y.h: prparserparse.h 308 ln -sf ${.ALLSRC} ${.TARGET} 309 310 LPREFIX.prparserlex.l=PrParser 311 prparserlex.l: ${TOPDIR}/prparser.l 312 ln -sf ${.ALLSRC} ${.TARGET} 313 314 CLEANFILES+= aslcompilerparse.y aslcompilerparse.c \ 315 aslcompilerparse.h \ 316 aslcompiler.y.h aslcompilerparse.output \ 317 aslcompilerlex.l aslcompilerlex.c \ 318 \ 319 dtparserparse.y dtparserparse.c \ 320 dtparserparse.h \ 321 dtparserlex.l dtparserlex.c \ 322 dtparser.y.h dtparserparse.output \ 323 \ 324 prparserparse.y prparserparse.c \ 325 prparserparse.h \ 326 prparserlex.l prparserlex.c \ 327 prparser.y.h prparserparse.output \ 328 \ 329 y.output y.tab.h 330 331 .include <bsd.prog.mk> 332 333 ${__DPSRCS.d} ${OBJS}: prparser.y.h dtparser.y.h aslcompiler.y.h 334