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