1# $NetBSD: Makefile,v 1.28 2022/12/10 17:41:05 christos 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 utcksum.c \ 238 utcopy.c \ 239 utdebug.c \ 240 utdecode.c \ 241 utdelete.c \ 242 uterror.c \ 243 utexcep.c \ 244 utglobal.c \ 245 uthex.c \ 246 utinit.c \ 247 utlock.c \ 248 utmath.c \ 249 utmisc.c \ 250 utmutex.c \ 251 utnonansi.c \ 252 utobject.c \ 253 utosi.c \ 254 utownerid.c \ 255 utpredef.c \ 256 utresdecode.c \ 257 utresrc.c \ 258 utstate.c \ 259 utstring.c \ 260 utstrsuppt.c \ 261 utstrtoul64.c \ 262 utuuid.c \ 263 utxface.c \ 264 utxferror.c 265 266# utprint.c 267 268.PATH: ${TOPDIR}/../os_specific/service_layers 269SRCS+= osunixxf.c 270 271YHEADER= # Generate headers 272YFLAGS+=-v # Require debugging 273LFLAGS+=-i # Case insensitivive parser 274 275 276# Prevent rules from firing. 277asltypes.h: asltypes.y 278 @true 279asltypes.c: asltypes.y 280 @true 281 282aslparser.y: asltokens.y asltypes.y aslrules.y aslsupport.y 283 284YPREFIX.aslcompilerparse.y=AslCompiler 285aslcompilerparse.y: aslparser.y 286 ${TOOL_M4} -P -I${TOPDIR} ${.ALLSRC} > ${.TARGET}.tmp.${.MAKE.PID} \ 287 && mv ${.TARGET}.tmp.${.MAKE.PID} ${.TARGET} 288 289aslcompiler.y.h: aslcompilerparse.h 290 ln -sf ${.ALLSRC} ${.TARGET} 291 292LPREFIX.aslcompilerlex.l=AslCompiler 293aslcompilerlex.l: ${TOPDIR}/aslcompiler.l 294 ln -sf ${.ALLSRC} ${.TARGET} 295 296 297YPREFIX.dtparserparse.y=DtParser 298dtparserparse.y: ${TOPDIR}/dtparser.y 299 ln -sf ${.ALLSRC} ${.TARGET} 300 301dtparser.y.h: dtparserparse.h 302 ln -sf ${.ALLSRC} ${.TARGET} 303 304LPREFIX.dtparserlex.l=DtParser 305dtparserlex.l: ${TOPDIR}/dtparser.l 306 ln -sf ${.ALLSRC} ${.TARGET} 307 308YPREFIX.dtcompilerparserparse.y=DtCompilerParser 309YFLAGS.dtcompilerparserparse.y += -L 310dtcompilerparserparse.y: ${TOPDIR}/dtcompilerparser.y 311 ln -sf ${.ALLSRC} ${.TARGET} 312 313dtcompilerparser.y.h: dtcompilerparserparse.h 314 ln -sf ${.ALLSRC} ${.TARGET} 315 316LPREFIX.dtcompilerparserlex.l=DtCompilerParser 317LFLAGS.dtcompilerparserlex.l += --bison-locations 318dtcompilerparserlex.l: ${TOPDIR}/dtcompilerparser.l 319 ln -sf ${.ALLSRC} ${.TARGET} 320 321YPREFIX.prparserparse.y=PrParser 322prparserparse.y: ${TOPDIR}/prparser.y 323 ln -sf ${.ALLSRC} ${.TARGET} 324 325prparser.y.h: prparserparse.h 326 ln -sf ${.ALLSRC} ${.TARGET} 327 328LPREFIX.prparserlex.l=PrParser 329prparserlex.l: ${TOPDIR}/prparser.l 330 ln -sf ${.ALLSRC} ${.TARGET} 331 332CLEANFILES+= aslcompilerparse.y aslcompilerparse.c \ 333 aslcompilerparse.h \ 334 aslcompiler.y.h aslcompilerparse.output \ 335 aslcompilerlex.l aslcompilerlex.c \ 336 \ 337 dtparserparse.y dtparserparse.c \ 338 dtparserparse.h \ 339 dtparserlex.l dtparserlex.c \ 340 dtparser.y.h dtparserparse.output \ 341 \ 342 dtcompilerparserparse.y dtcompilerparserparse.c \ 343 dtcompilerparserparse.h \ 344 dtcompilerparserlex.l dtcompilerparserlex.c \ 345 dtcompilerparser.y.h dtcompilerparserparse.output \ 346 \ 347 prparserparse.y prparserparse.c \ 348 prparserparse.h \ 349 prparserlex.l prparserlex.c \ 350 prparser.y.h prparserparse.output \ 351 \ 352 y.output y.tab.h 353 354.include <bsd.prog.mk> 355 356${__DPSRCS.d} ${OBJS}: prparser.y.h dtparser.y.h aslcompiler.y.h \ 357 dtcompilerparser.y.h 358