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