external/bsd/acpica/bin/iasl/Makefile
author christos <christos@NetBSD.org>
Sun, 12 Nov 2017 03:02:15 +0000
branchtrunk
changeset 273233 4613bb568720
parent 272518 224dfa9d395a
child 317857 99b8b96fab9e
child 318221 e2adcc018167
permissions -rw-r--r--
new files for acpica-20171110

# $NetBSD: Makefile,v 1.17 2017/11/12 03:02:15 christos Exp $

.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
PROG=	iasl
.endif
BINDIR=	/usr/bin
MAN=	iasl.8
WARNS=	0
TOPDIR=	${NETBSDSRCDIR}/sys/external/bsd/acpica/dist/compiler

.include <bsd.own.mk>

CPPFLAGS+=	-I${TOPDIR}/../include -I${TOPDIR} -I.
CPPFLAGS+=	-D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
CPPFLAGS+=	-D_USE_BERKELEY_YACC
.if ${MKREPRO:Uno} == "yes"
CPPFLAGS+=	-DACPI_REPRO
.endif
LDADD+=		-ll -ly -lrt -lpthread
DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}

DPSRCS= aslcompilerparse.y aslcompilerlex.c aslcompilerparse.c \
	dtparserparse.c dtparserlex.c prparserparse.c prparserlex.c

.PATH:	${TOPDIR}
SRCS+= \
	adfile.c \
	aslallocate.c \
	aslanalyze.c \
	aslascii.c \
	aslbtypes.c \
	aslcache.c \
	aslcodegen.c \
	aslcompile.c \
	aslcompilerlex.c \
	aslcompilerparse.c \
	asldebug.c \
	aslerror.c \
	aslexternal.c \
	aslfileio.c \
	aslfiles.c \
	aslfold.c \
	aslhelp.c \
	aslhex.c \
	asllength.c \
	asllisting.c \
	asllistsup.c \
	aslload.c \
	asllookup.c \
	aslmain.c \
	aslmap.c \
	aslmapenter.c \
	aslmapoutput.c \
	aslmaputils.c \
	aslmessages.c \
	aslmethod.c \
	aslnamesp.c \
	asloffset.c \
	aslopcodes.c \
	asloperands.c \
	aslopt.c \
	asloptions.c \
	aslparseop.c \
	aslpld.c \
	aslpredef.c \
	aslprepkg.c \
	aslprintf.c \
	aslprune.c \
	aslresource.c \
	aslrestype1.c \
	aslrestype1i.c \
	aslrestype2.c \
	aslrestype2d.c \
	aslrestype2e.c \
	aslrestype2q.c \
	aslrestype2s.c \
	aslrestype2w.c \
	aslstartup.c \
	aslstubs.c \
	asltransform.c \
	asltree.c \
	aslutils.c \
	asluuid.c \
	aslwalks.c \
	aslxref.c \
	aslxrefout.c \
	cvcompiler.c \
	cvdisasm.c \
	cvparser.c \
	dtcompile.c \
	dtexpress.c \
	dtfield.c \
	dtio.c \
	dtparserlex.c \
	dtparserparse.c \
	dtsubtable.c \
	dttable.c \
	dttable1.c \
	dttable2.c \
	dttemplate.c \
	dtutils.c \
	prexpress.c \
	prmacros.c \
	prparserlex.c \
	prparserparse.c \
	prscan.c \
	prutils.c

.PATH: ${TOPDIR}/../common
SRCS+= \
	acfileio.c \
	adisasm.c \
	adwalk.c \
	ahids.c \
	ahpredef.c \
	ahtable.c \
	ahuuids.c \
	cmfsize.c \
	dmextern.c \
	dmrestag.c \
	dmswitch.c \
	dmtable.c \
	dmtables.c \
	dmtbdump.c \
	dmtbinfo.c \
	getopt.c

.PATH: ${TOPDIR}/../debugger
SRCS+=  dbfileio.c

.PATH: ${TOPDIR}/../disassembler
SRCS+= \
	dmbuffer.c \
	dmcstyle.c \
	dmdeferred.c \
	dmnames.c \
	dmopcode.c \
	dmresrc.c \
	dmresrcl.c \
	dmresrcl2.c \
	dmresrcs.c \
	dmutils.c \
	dmwalk.c

.PATH: ${TOPDIR}/../dispatcher
SRCS+= \
	dsargs.c \
	dscontrol.c \
	dsfield.c \
	dsobject.c \
	dsopcode.c \
	dspkginit.c \
	dsutils.c \
	dswexec.c \
	dswload.c \
	dswload2.c \
	dswscope.c \
	dswstate.c

.PATH: ${TOPDIR}/../executer
SRCS+= \
	exconvrt.c \
	excreate.c \
	exconcat.c \
	exdump.c \
	exmisc.c \
	exmutex.c \
	exnames.c \
	exoparg1.c \
	exoparg2.c \
	exoparg3.c \
	exoparg6.c \
	exprep.c \
	exregion.c \
	exresnte.c \
	exresolv.c \
	exresop.c \
	exstore.c \
	exstoren.c \
	exstorob.c \
	exsystem.c \
	exutils.c

.PATH: ${TOPDIR}/../parser
SRCS+= \
	psargs.c \
	psloop.c \
	psobject.c \
	psopcode.c \
	psopinfo.c \
	psparse.c \
	psscope.c \
	pstree.c \
	psutils.c \
	pswalk.c

.PATH: ${TOPDIR}/../tables
SRCS+=	\
	tbfadt.c \
	tbdata.c \
	tbinstal.c \
	tbprint.c \
	tbutils.c \
	tbxface.c \
	tbxfload.c

.PATH: ${TOPDIR}/../namespace
SRCS+= \
	nsaccess.c \
	nsalloc.c \
	nsdump.c \
	nsnames.c \
	nsobject.c \
	nsparse.c \
	nssearch.c \
	nsutils.c \
	nswalk.c \
	nsxfobj.c \

.PATH: ${TOPDIR}/../utilities
SRCS+= \
	utaddress.c \
	utalloc.c \
	utascii.c \
	utbuffer.c \
	utcache.c \
	utcopy.c \
	utdebug.c \
	utdecode.c \
	utdelete.c \
	uterror.c \
	utexcep.c \
	utglobal.c \
	uthex.c \
	utinit.c \
	utlock.c \
	utmath.c \
	utmisc.c \
	utmutex.c \
	utnonansi.c \
	utobject.c \
	utosi.c \
	utownerid.c \
	utpredef.c \
	utresdecode.c \
	utresrc.c \
	utstate.c \
	utstring.c \
	utstrsuppt.c \
	utstrtoul64.c \
	utuuid.c \
	utxface.c \
	utxferror.c

#	utprint.c 

.PATH: ${TOPDIR}/../os_specific/service_layers
SRCS+=	osunixxf.c

YHEADER=	# Generate headers
YFLAGS+=-v	# Require debugging
FLAGS+=-i	# Case insensitivive parser


# Prevent rules from firing.
asltypes.h: asltypes.y
	@true
asltypes.c: asltypes.y
	@true

aslparser.y: asltokens.y asltypes.y aslrules.y aslsupport.y

YPREFIX.aslcompilerparse.y=AslCompiler
aslcompilerparse.y: aslparser.y
	${TOOL_M4} -P -I${TOPDIR} ${.ALLSRC} > ${.TARGET}

aslcompiler.y.h: aslcompilerparse.h
	ln -sf ${.ALLSRC} ${.TARGET}

LPREFIX.aslcompilerlex.l=AslCompiler
aslcompilerlex.l: ${TOPDIR}/aslcompiler.l
	ln -sf ${.ALLSRC} ${.TARGET}


YPREFIX.dtparserparse.y=DtParser
dtparserparse.y: ${TOPDIR}/dtparser.y
	ln -sf ${.ALLSRC} ${.TARGET}

dtparser.y.h: dtparserparse.h
	ln -sf ${.ALLSRC} ${.TARGET}

LPREFIX.dtparserlex.l=DtParser
dtparserlex.l: ${TOPDIR}/dtparser.l
	ln -sf ${.ALLSRC} ${.TARGET}


YPREFIX.prparserparse.y=PrParser
prparserparse.y: ${TOPDIR}/prparser.y
	ln -sf ${.ALLSRC} ${.TARGET}

prparser.y.h: prparserparse.h
	ln -sf ${.ALLSRC} ${.TARGET}

LPREFIX.prparserlex.l=PrParser
prparserlex.l: ${TOPDIR}/prparser.l
	ln -sf ${.ALLSRC} ${.TARGET}

CLEANFILES+=	aslcompilerparse.y  aslcompilerparse.c	\
		aslcompilerparse.h			\
		aslcompiler.y.h aslcompilerparse.output \
		aslcompilerlex.l aslcompilerlex.c	\
							\
		dtparserparse.y dtparserparse.c		\
		dtparserparse.h				\
		dtparserlex.l dtparserlex.c		\
		dtparser.y.h dtparserparse.output	\
							\
		prparserparse.y prparserparse.c		\
		prparserparse.h				\
		prparserlex.l prparserlex.c		\
		prparser.y.h prparserparse.output	\

.include <bsd.prog.mk>

${__DPSRCS.d} ${OBJS}: prparser.y.h dtparser.y.h aslcompiler.y.h