xref: /freebsd/usr.sbin/acpi/iasl/Makefile (revision eb69d1f144a6fcc765d1b9d44a5ae8082353e70b)
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 dtexpress.c dtfield.c dtio.c dtparser.y.h	\
30	dtparserlex.c dtparserparse.c dtsubtable.c dttable.c	\
31	dttable1.c dttable2.c dttemplate.c dtutils.c		\
32	prexpress.c prmacros.c prparser.y.h prparserlex.c	\
33	prparserparse.c prscan.c prutils.c
34
35# components/debugger
36SRCS+=	dbfileio.c
37
38# components/disassembler
39SRCS+=	dmbuffer.c dmcstyle.c dmdeferred.c dmnames.c dmopcode.c	\
40	dmresrc.c dmresrcl.c dmresrcl2.c dmresrcs.c dmutils.c	\
41	dmwalk.c
42
43# components/dispatcher
44SRCS+=	dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c	\
45	dspkginit.c dsutils.c dswexec.c dswload.c dswload2.c	\
46	dswscope.c dswstate.c
47
48# components/executer
49SRCS+=	exconcat.c exconvrt.c excreate.c exdump.c exmisc.c	\
50	exmutex.c exnames.c exoparg1.c exoparg2.c exoparg3.c	\
51	exoparg6.c exprep.c exresnte.c exresolv.c exresop.c	\
52	exstore.c exstoren.c exstorob.c exsystem.c exutils.c
53
54# components/parser
55SRCS+=	psargs.c psloop.c psobject.c psopcode.c psopinfo.c	\
56	psparse.c psscope.c pstree.c psutils.c pswalk.c
57
58# components/namespace
59SRCS+=	nsaccess.c nsalloc.c nsdump.c nsnames.c nsobject.c	\
60	nsparse.c nssearch.c nsutils.c nswalk.c
61
62# components/tables
63SRCS+=	tbdata.c tbfadt.c tbinstal.c tbprint.c tbutils.c	\
64	tbxface.c tbxfload.c
65
66# components/utilities
67SRCS+=	utaddress.c utalloc.c utascii.c utbuffer.c utcache.c	\
68	utcopy.c utdebug.c utdecode.c utdelete.c uterror.c	\
69	utexcep.c utglobal.c uthex.c utinit.c utlock.c utmath.c	\
70	utmisc.c utmutex.c utnonansi.c utobject.c utownerid.c	\
71	utpredef.c utresdecode.c utresrc.c utstate.c utstring.c	\
72	utstrsuppt.c utstrtoul64.c utuuid.c utxface.c		\
73	utxferror.c
74
75# os_specific/service_layers
76SRCS+=	osunixxf.c
77
78WARNS?=	2
79
80MAN=	iasl.8
81
82CFLAGS+= -DACPI_ASL_COMPILER -I.
83LFLAGS= -i -s
84YFLAGS= -d
85
86CLEANFILES= aslcompiler.y aslcompiler.y.h aslcompilerlex.c	\
87	aslcompilerparse.c aslcompilerparse.h dtparser.y.h	\
88	dtparserlex.c dtparserparse.c dtparserparse.h		\
89	prparser.y.h prparserlex.c prparserparse.c		\
90	prparserparse.h
91
92PARSER=	aslcstyle.y aslhelpers.y aslkeywords.y aslparser.y	\
93	aslprimaries.y aslresources.y aslrules.y aslsupport.y	\
94	asltokens.y asltypes.y
95
96aslcompilerlex.c: aslcompiler.l aslsupport.l
97	${LEX} ${LFLAGS} -PAslCompiler -o${.TARGET} \
98	    ${ACPICA_DIR}/compiler/aslcompiler.l
99
100aslcompiler.y: ${PARSER}
101	m4 -P -I${ACPICA_DIR}/compiler \
102	    ${ACPICA_DIR}/compiler/aslparser.y > ${.TARGET}
103
104.ORDER: aslcompilerparse.c aslcompilerparse.h
105aslcompilerparse.h: .NOMETA
106aslcompilerparse.c aslcompilerparse.h: aslcompiler.y
107	${YACC} ${YFLAGS} -pAslCompiler -oaslcompilerparse.c ${.ALLSRC}
108
109aslcompiler.y.h: aslcompilerparse.h .NOMETA
110	ln -f ${.ALLSRC} ${.TARGET}
111
112dtparserlex.c: dtparser.l
113	${LEX} ${LFLAGS} -PDtParser -o${.TARGET} ${.ALLSRC}
114
115.ORDER: dtparserparse.c dtparserparse.h
116dtparserparse.h: .NOMETA
117dtparserparse.c dtparserparse.h: dtparser.y
118	${YACC} ${YFLAGS} -pDtParser -odtparserparse.c ${.ALLSRC}
119
120dtparser.y.h: dtparserparse.h .NOMETA
121	ln -f ${.ALLSRC} ${.TARGET}
122
123prparserlex.c: prparser.l
124	${LEX} ${LFLAGS} -PPrParser -o${.TARGET} ${.ALLSRC}
125
126.ORDER: prparserparse.c prparserparse.h
127prparserparse.h: .NOMETA
128prparserparse.c prparserparse.h: prparser.y
129	${YACC} ${YFLAGS} -pPrParser -oprparserparse.c ${.ALLSRC}
130
131prparser.y.h: prparserparse.h .NOMETA
132	ln -f ${.ALLSRC} ${.TARGET}
133
134.include <bsd.prog.mk>
135