xref: /freebsd/usr.sbin/acpi/iasl/Makefile (revision 3416500aef140042c64bc149cb1ec6620483bc44)
1# $FreeBSD$
2
3PROG=	iasl
4
5# common
6SRCS=	acfileio.c adfile.c adisasm.c adwalk.c ahids.c		\
7	ahpredef.c ahtable.c ahuuids.c cmfsize.c dmextern.c	\
8	dmrestag.c dmswitch.c dmtable.c dmtables.c dmtbdump.c	\
9	dmtbinfo.c getopt.c
10
11# compiler
12SRCS+=	aslanalyze.c aslascii.c aslbtypes.c aslcodegen.c	\
13	aslcompile.c aslcompiler.y.h aslcompilerlex.c		\
14	aslcompilerparse.c asldebug.c aslerror.c aslexternal.c	\
15	aslfileio.c aslfiles.c aslfold.c aslhelp.c aslhex.c	\
16	asllength.c asllisting.c asllistsup.c aslload.c		\
17	asllookup.c aslmain.c aslmap.c aslmapenter.c		\
18	aslmapoutput.c aslmaputils.c aslmessages.c aslmethod.c	\
19	aslnamesp.c asloffset.c aslopcodes.c asloperands.c	\
20	aslopt.c asloptions.c aslpld.c aslpredef.c aslprepkg.c	\
21	aslprintf.c aslprune.c aslresource.c aslrestype1.c	\
22	aslrestype1i.c aslrestype2.c aslrestype2d.c		\
23	aslrestype2e.c aslrestype2q.c aslrestype2s.c		\
24	aslrestype2w.c aslstartup.c aslstubs.c asltransform.c	\
25	asltree.c aslutils.c asluuid.c aslwalks.c aslxref.c	\
26	aslxrefout.c cvcompiler.c cvdisasm.c cvparser.c		\
27	dtcompile.c dtexpress.c dtfield.c dtio.c dtparser.y.h	\
28	dtparserlex.c dtparserparse.c dtsubtable.c dttable.c	\
29	dttable1.c dttable2.c dttemplate.c dtutils.c		\
30	prexpress.c prmacros.c prparser.y.h prparserlex.c	\
31	prparserparse.c prscan.c prutils.c
32
33# components/debugger
34SRCS+=	dbfileio.c
35
36# components/disassembler
37SRCS+=	dmbuffer.c dmcstyle.c dmdeferred.c dmnames.c dmopcode.c	\
38	dmresrc.c dmresrcl.c dmresrcl2.c dmresrcs.c dmutils.c	\
39	dmwalk.c
40
41# components/dispatcher
42SRCS+=	dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c	\
43	dsutils.c dswexec.c dswload.c dswload2.c dswscope.c	\
44	dswstate.c
45
46# components/executer
47SRCS+=	exconcat.c exconvrt.c excreate.c exdump.c exmisc.c	\
48	exmutex.c exnames.c exoparg1.c exoparg2.c exoparg3.c	\
49	exoparg6.c exprep.c exresnte.c exresolv.c exresop.c	\
50	exstore.c exstoren.c exstorob.c exsystem.c exutils.c
51
52# components/parser
53SRCS+=	psargs.c psloop.c psobject.c psopcode.c psopinfo.c	\
54	psparse.c psscope.c pstree.c psutils.c pswalk.c
55
56# components/namespace
57SRCS+=	nsaccess.c nsalloc.c nsdump.c nsnames.c nsobject.c	\
58	nsparse.c nssearch.c nsutils.c nswalk.c
59
60# components/tables
61SRCS+=	tbdata.c tbfadt.c tbinstal.c tbprint.c tbutils.c	\
62	tbxface.c tbxfload.c
63
64# components/utilities
65SRCS+=	utaddress.c utalloc.c utascii.c utbuffer.c utcache.c	\
66	utcopy.c utdebug.c utdecode.c utdelete.c uterror.c	\
67	utexcep.c utglobal.c uthex.c utinit.c utlock.c utmath.c	\
68	utmisc.c utmutex.c utnonansi.c utobject.c utownerid.c	\
69	utpredef.c utresdecode.c utresrc.c utstate.c utstring.c	\
70	utstrtoul64.c utuuid.c utxface.c utxferror.c
71
72# os_specific/service_layers
73SRCS+=	osunixxf.c
74
75WARNS?=	2
76
77MAN=	iasl.8
78
79CFLAGS+= -DACPI_ASL_COMPILER -I.
80LFLAGS= -i -s
81YFLAGS= -d
82
83CLEANFILES= aslcompiler.y aslcompiler.y.h aslcompilerlex.c	\
84	aslcompilerparse.c aslcompilerparse.h dtparser.y.h	\
85	dtparserlex.c dtparserparse.c dtparserparse.h		\
86	prparser.y.h prparserlex.c prparserparse.c		\
87	prparserparse.h
88
89PARSER=	aslcstyle.y aslhelpers.y aslkeywords.y aslparser.y	\
90	aslprimaries.y aslresources.y aslrules.y aslsupport.y	\
91	asltokens.y asltypes.y
92
93aslcompilerlex.c: aslcompiler.l aslsupport.l
94	${LEX} ${LFLAGS} -PAslCompiler -o${.TARGET} \
95	    ${ACPICA_DIR}/compiler/aslcompiler.l
96
97aslcompiler.y: ${PARSER}
98	m4 -P -I${ACPICA_DIR}/compiler \
99	    ${ACPICA_DIR}/compiler/aslparser.y > ${.TARGET}
100
101.ORDER: aslcompilerparse.c aslcompilerparse.h
102aslcompilerparse.h: .NOMETA
103aslcompilerparse.c aslcompilerparse.h: aslcompiler.y
104	${YACC} ${YFLAGS} -pAslCompiler -oaslcompilerparse.c ${.ALLSRC}
105
106aslcompiler.y.h: aslcompilerparse.h .NOMETA
107	ln -f ${.ALLSRC} ${.TARGET}
108
109dtparserlex.c: dtparser.l
110	${LEX} ${LFLAGS} -PDtParser -o${.TARGET} ${.ALLSRC}
111
112.ORDER: dtparserparse.c dtparserparse.h
113dtparserparse.h: .NOMETA
114dtparserparse.c dtparserparse.h: dtparser.y
115	${YACC} ${YFLAGS} -pDtParser -odtparserparse.c ${.ALLSRC}
116
117dtparser.y.h: dtparserparse.h .NOMETA
118	ln -f ${.ALLSRC} ${.TARGET}
119
120prparserlex.c: prparser.l
121	${LEX} ${LFLAGS} -PPrParser -o${.TARGET} ${.ALLSRC}
122
123.ORDER: prparserparse.c prparserparse.h
124prparserparse.h: .NOMETA
125prparserparse.c prparserparse.h: prparser.y
126	${YACC} ${YFLAGS} -pPrParser -oprparserparse.c ${.ALLSRC}
127
128prparser.y.h: prparserparse.h .NOMETA
129	ln -f ${.ALLSRC} ${.TARGET}
130
131.include <bsd.prog.mk>
132