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