xref: /freebsd/usr.sbin/acpi/iasl/Makefile (revision fd45b686f9d92f583366c75b22c04c7ee49709c0)
1
2PROG=	iasl
3
4# common
5SRCS=	acfileio.c adfile.c adisasm.c adwalk.c ahids.c		\
6	ahpredef.c ahtable.c ahuuids.c cmfsize.c dmextern.c	\
7	dmrestag.c dmswitch.c dmtable.c dmtables.c dmtbdump.c	\
8	dmtbdump1.c dmtbdump2.c dmtbdump3.c dmtbinfo.c		\
9	dmtbinfo1.c dmtbinfo2.c dmtbinfo3.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 dtcompilerparser.y.h dtcompilerparserlex.c	\
29	dtcompilerparserparse.c dtexpress.c dtfield.c dtio.c	\
30	dtparser.y.h dtparserlex.c dtparserparse.c dtsubtable.c	\
31	dttable.c 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	utcksum.c utcopy.c utdebug.c utdecode.c utdelete.c	\
69	uterror.c utexcep.c utglobal.c uthex.c utinit.c		\
70	utlock.c utmath.c utmisc.c utmutex.c utnonansi.c	\
71	utobject.c utownerid.c utpredef.c utresdecode.c		\
72	utresrc.c utstate.c utstring.c utstrsuppt.c		\
73	utstrtoul64.c utuuid.c utxface.c utxferror.c
74
75# os_specific/service_layers
76SRCS+=	osunixxf.c
77
78WARNS?=	2
79
80MAN=	iasl.8
81
82CFLAGS+= -DACPI_ASL_COMPILER -I.
83CWARNFLAGS.aslrestype2s.c= ${NO_WUNUSED_BUT_SET_VARIABLE}
84CWARNFLAGS.dmextern.c= ${NO_WUNUSED_BUT_SET_VARIABLE}
85LFLAGS= -i -s
86DLFLAGS=-i
87YFLAGS= -d
88
89CLEANFILES= aslcompiler.y aslcompiler.y.h aslcompilerlex.c	\
90	aslcompilerparse.c aslcompilerparse.h			\
91	dtcompilerparser.y.h dtcompilerparserlex.c		\
92	dtcompilerparserparse.c	dtcompilerparserparse.h		\
93	dtparser.y.h dtparserlex.c dtparserparse.c		\
94	dtparserparse.h prparser.y.h prparserlex.c		\
95	prparserparse.c prparserparse.h
96
97PARSER=	aslcstyle.y aslhelpers.y aslkeywords.y aslparser.y	\
98	aslprimaries.y aslresources.y aslrules.y aslsupport.y	\
99	asltokens.y asltypes.y
100
101aslcompilerlex.c: aslcompiler.l aslsupport.l
102	${LEX} ${LFLAGS} -PAslCompiler -o${.TARGET} \
103	    ${ACPICA_DIR}/compiler/aslcompiler.l
104
105aslcompiler.y: ${PARSER}
106	m4 -P -I${ACPICA_DIR}/compiler \
107	    ${ACPICA_DIR}/compiler/aslparser.y > ${.TARGET}
108
109.ORDER: aslcompilerparse.c aslcompilerparse.h
110aslcompilerparse.h: .NOMETA
111aslcompilerparse.c aslcompilerparse.h: aslcompiler.y
112	${YACC} ${YFLAGS} -pAslCompiler -oaslcompilerparse.c ${.ALLSRC}
113
114aslcompiler.y.h: aslcompilerparse.h .NOMETA
115	ln -f ${.ALLSRC} ${.TARGET}
116
117dtcompilerparserlex.c: dtcompilerparser.l
118	${LEX} ${DLFLAGS} -PDtCompilerParser -o${.TARGET} ${.ALLSRC}
119
120.ORDER: dtcompilerparserparse.c dtcompilerparserparse.h
121dtcompilerparserparse.h: .NOMETA
122dtcompilerparserparse.c dtcompilerparserparse.h: dtcompilerparser.y
123	${YACC} ${YFLAGS} -pDtCompilerParser -odtcompilerparserparse.c \
124	    ${.ALLSRC}
125
126dtcompilerparser.y.h: dtcompilerparserparse.h .NOMETA
127	ln -f ${.ALLSRC} ${.TARGET}
128
129dtparserlex.c: dtparser.l
130	${LEX} ${DLFLAGS} -PDtParser -o${.TARGET} ${.ALLSRC}
131
132.ORDER: dtparserparse.c dtparserparse.h
133dtparserparse.h: .NOMETA
134dtparserparse.c dtparserparse.h: dtparser.y
135	${YACC} ${YFLAGS} -pDtParser -odtparserparse.c ${.ALLSRC}
136
137dtparser.y.h: dtparserparse.h .NOMETA
138	ln -f ${.ALLSRC} ${.TARGET}
139
140prparserlex.c: prparser.l
141	${LEX} ${LFLAGS} -PPrParser -o${.TARGET} ${.ALLSRC}
142
143.ORDER: prparserparse.c prparserparse.h
144prparserparse.h: .NOMETA
145prparserparse.c prparserparse.h: prparser.y
146	${YACC} ${YFLAGS} -pPrParser -oprparserparse.c ${.ALLSRC}
147
148prparser.y.h: prparserparse.h .NOMETA
149	ln -f ${.ALLSRC} ${.TARGET}
150
151# AcpiUtInitStackPtrTrace intentionally leaks a pointer to an
152# on-stack variable.
153CWARNFLAGS.utdebug.c+= ${NO_WDANGLING_POINTER}
154
155.include <bsd.prog.mk>
156