1# $NetBSD: Makefile,v 1.4 2011/06/28 09:11:33 jruoho Exp $ 2 3.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") 4PROG= iasl 5.endif 6BINDIR= /usr/bin 7MAN= iasl.8 8WARNS= 0 9TOPDIR= ${NETBSDSRCDIR}/sys/external/bsd/acpica/dist/compiler 10 11.include <bsd.own.mk> 12 13CPPFLAGS+= -I${TOPDIR}/../include -I${TOPDIR} -I. 14CPPFLAGS+= -D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT 15CPPFLAGS+= -D_USE_BERKELEY_YACC 16LDADD+= -ll -ly -lrt -lpthread 17DPADD+= ${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD} 18 19DPSRCS= aslcompilerparse.c aslcompilerlex.c \ 20 dtparserparse.c dtparserlex.c 21 22.PATH: ${TOPDIR} 23SRCS+= aslcompilerparse.c aslcompilerlex.c adfile.c \ 24 aslanalyze.c aslbtypes.c aslcodegen.c aslcompile.c \ 25 aslerror.c aslfiles.c aslfold.c asllength.c \ 26 asllisting.c aslload.c asllookup.c aslmain.c aslmap.c \ 27 aslopcodes.c asloperands.c aslopt.c aslpredef.c \ 28 aslresource.c aslrestype1.c aslrestype1i.c \ 29 aslrestype2.c aslrestype2d.c aslrestype2e.c \ 30 aslrestype2q.c aslrestype2w.c aslstartup.c aslstubs.c \ 31 asltransform.c asltree.c aslutils.c asluuid.c \ 32 aslwalks.c dtcompile.c dtexpress.c dtfield.c dtio.c \ 33 dtparserparse.c dtparserlex.c \ 34 dtsubtable.c dttable.c dttemplate.c dtutils.c 35 36.PATH: ${TOPDIR}/../common 37SRCS+= adisasm.c adwalk.c dmextern.c dmrestag.c dmtable.c \ 38 dmtbdump.c dmtbinfo.c getopt.c 39 40.PATH: ${TOPDIR}/../debugger 41SRCS+= dbfileio.c 42 43.PATH: ${TOPDIR}/../disassembler 44SRCS+= dmbuffer.c dmnames.c dmobject.c dmopcode.c dmresrc.c \ 45 dmresrcl.c dmresrcs.c dmutils.c dmwalk.c 46 47.PATH: ${TOPDIR}/../dispatcher 48SRCS+= dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c \ 49 dsutils.c dswexec.c dswload.c dswload2.c dswscope.c \ 50 dswstate.c 51 52.PATH: ${TOPDIR}/../executer 53SRCS+= exconvrt.c excreate.c exdump.c exmisc.c exmutex.c \ 54 exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c \ 55 exprep.c exregion.c exresnte.c exresolv.c exresop.c \ 56 exstore.c exstoren.c exstorob.c exsystem.c exutils.c 57 58.PATH: ${TOPDIR}/../parser 59SRCS+= psargs.c psloop.c psopcode.c psparse.c psscope.c \ 60 pstree.c psutils.c pswalk.c 61 62.PATH: ${TOPDIR}/../tables 63SRCS+= tbfadt.c tbinstal.c tbutils.c tbxface.c 64 65.PATH: ${TOPDIR}/../namespace 66SRCS+= nsaccess.c nsalloc.c nsdump.c nsnames.c nsobject.c \ 67 nsparse.c nssearch.c nsutils.c nswalk.c nsxfobj.c 68 69.PATH: ${TOPDIR}/../utilities 70SRCS+= utalloc.c utcache.c utcopy.c utdebug.c utdecode.c \ 71 utdelete.c utglobal.c utinit.c utlock.c utmath.c \ 72 utmisc.c utmutex.c utobject.c utosi.c utresrc.c \ 73 utstate.c utxface.c utxferror.c 74 75.PATH: ${TOPDIR}/../os_specific/service_layers 76SRCS+= osunixxf.c 77 78aslcompilerparse.c: ${TOPDIR}/aslcompiler.y 79 ${YACC} -v -d -o${.TARGET} -pAslCompiler ${.ALLSRC} 80 mv -f ${.PREFIX}.h aslcompiler.y.h 81 82aslcompilerlex.c: ${TOPDIR}/aslcompiler.l 83 ${LEX} -i -PAslCompiler -o${.TARGET} ${.ALLSRC} 84 85dtparserparse.c: ${TOPDIR}/dtparser.y 86 ${YACC} -v -d -o${.TARGET} -pDtParser ${.ALLSRC} 87 mv -f ${.PREFIX}.h dtparser.y.h 88 89dtparserlex.c: ${TOPDIR}/dtparser.l 90 ${LEX} -i -PDtParser -o${.TARGET} ${.ALLSRC} 91 92CLEANFILES+= aslcompilerlex.c aslcompilerparse.c \ 93 aslcompiler.y.h aslcompilerparse.output \ 94 dtparserlex.c dtparserparse.c \ 95 dtparser.y.h dtparserparse.output 96 97.include <bsd.prog.mk> 98