xref: /freebsd/usr.sbin/acpi/iasl/Makefile (revision 1c05a6ea6b849ff95e539c31adea887c644a6a01)
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+=	aslallocate.c aslanalyze.c aslascii.c aslbtypes.c	\
13	aslcache.c aslcodegen.c aslcompile.c aslcompiler.y.h	\
14	aslcompilerlex.c aslcompilerparse.c asldebug.c		\
15	aslerror.c aslexternal.c aslfileio.c aslfiles.c		\
16	aslfold.c aslhelp.c aslhex.c asllength.c asllisting.c	\
17	asllistsup.c aslload.c asllookup.c aslmain.c aslmap.c	\
18	aslmapenter.c aslmapoutput.c aslmaputils.c		\
19	aslmessages.c aslmethod.c aslnamesp.c asloffset.c	\
20	aslopcodes.c asloperands.c aslopt.c asloptions.c	\
21	aslparseop.c aslpld.c aslpredef.c aslprepkg.c		\
22	aslprintf.c aslprune.c aslresource.c aslrestype1.c	\
23	aslrestype1i.c aslrestype2.c aslrestype2d.c		\
24	aslrestype2e.c aslrestype2q.c aslrestype2s.c		\
25	aslrestype2w.c aslstartup.c aslstubs.c asltransform.c	\
26	asltree.c aslutils.c asluuid.c aslwalks.c aslxref.c	\
27	aslxrefout.c cvcompiler.c cvdisasm.c cvparser.c		\
28	dtcompile.c dtexpress.c dtfield.c dtio.c dtparser.y.h	\
29	dtparserlex.c dtparserparse.c dtsubtable.c dttable.c	\
30	dttable1.c dttable2.c dttemplate.c dtutils.c		\
31	prexpress.c prmacros.c prparser.y.h prparserlex.c	\
32	prparserparse.c prscan.c 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