xref: /freebsd/usr.sbin/acpi/iasl/Makefile (revision 119b75925c562202145d7bac7b676b98029c6cb9)
1# $FreeBSD$
2
3PROG=	iasl
4
5# common
6SRCS=	adfile.c adisasm.c adwalk.c ahids.c ahpredef.c		\
7	ahtable.c ahuuids.c cmfsize.c dmextern.c dmrestag.c	\
8	dmtable.c dmtbdump.c dmtbinfo.c getopt.c
9
10# compiler
11SRCS+=	aslanalyze.c aslascii.c aslbtypes.c aslcodegen.c	\
12	aslcompile.c aslcompiler.y.h aslcompilerlex.c		\
13	aslcompilerparse.c aslerror.c aslfileio.c aslfiles.c	\
14	aslfold.c aslhex.c asllength.c asllisting.c		\
15	asllistsup.c aslload.c asllookup.c aslmain.c aslmap.c	\
16	aslmapenter.c aslmapoutput.c aslmaputils.c		\
17	aslmessages.c aslmethod.c aslnamesp.c asloffset.c	\
18	aslopcodes.c asloperands.c aslopt.c asloptions.c	\
19	aslpredef.c aslprepkg.c aslprintf.c aslprune.c		\
20	aslresource.c aslrestype1.c aslrestype1i.c		\
21	aslrestype2.c aslrestype2d.c aslrestype2e.c		\
22	aslrestype2q.c aslrestype2s.c aslrestype2w.c		\
23	aslstartup.c aslstubs.c asltransform.c asltree.c	\
24	aslutils.c asluuid.c aslwalks.c aslxref.c dtcompile.c	\
25	dtexpress.c dtfield.c dtio.c dtparser.y.h dtparserlex.c	\
26	dtparserparse.c dtsubtable.c dttable.c dttemplate.c	\
27	dtutils.c prexpress.c prmacros.c prparser.y.h		\
28	prparserlex.c prparserparse.c prscan.c prutils.c
29
30# components/debugger
31SRCS+=	dbfileio.c
32
33# components/disassembler
34SRCS+=	dmbuffer.c dmcstyle.c dmdeferred.c dmnames.c dmopcode.c	\
35	dmresrc.c dmresrcl.c dmresrcl2.c dmresrcs.c dmutils.c	\
36	dmwalk.c
37
38# components/dispatcher
39SRCS+=	dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c	\
40	dsutils.c dswexec.c dswload.c dswload2.c dswscope.c	\
41	dswstate.c
42
43# components/executer
44SRCS+=	exconvrt.c excreate.c exdump.c exmisc.c exmutex.c	\
45	exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c	\
46	exprep.c exresnte.c exresolv.c exresop.c exstore.c	\
47	exstoren.c exstorob.c exsystem.c exutils.c
48
49# components/parser
50SRCS+=	psargs.c psloop.c psobject.c psopcode.c psopinfo.c	\
51	psparse.c psscope.c pstree.c psutils.c pswalk.c
52
53# components/namespace
54SRCS+=	nsaccess.c nsalloc.c nsdump.c nsnames.c nsobject.c	\
55	nsparse.c nssearch.c nsutils.c nswalk.c
56
57# components/tables
58SRCS+=	tbdata.c tbfadt.c tbinstal.c tbprint.c tbutils.c	\
59	tbxface.c
60
61# components/utilities
62SRCS+=	utaddress.c utalloc.c utbuffer.c utcache.c utcopy.c	\
63	utdebug.c utdecode.c utdelete.c uterror.c utexcep.c	\
64	utfileio.c utglobal.c uthex.c utinit.c utlock.c		\
65	utmath.c utmisc.c utmutex.c utnonansi.c utobject.c	\
66	utownerid.c utpredef.c utprint.c utresrc.c utstate.c	\
67	utstring.c utuuid.c utxface.c utxferror.c
68
69# os_specific/service_layers
70SRCS+=	oslibcfs.c osunixxf.c
71
72WARNS?=	2
73
74MAN=	iasl.8
75
76CFLAGS+= -DACPI_ASL_COMPILER -I.
77LFLAGS= -i -s
78YFLAGS= -d
79
80CLEANFILES= aslcompiler.y aslcompiler.y.h aslcompilerlex.c	\
81	aslcompilerparse.c aslcompilerparse.h dtparser.y.h	\
82	dtparserlex.c dtparserparse.c dtparserparse.h		\
83	prparser.y.h prparserlex.c prparserparse.c		\
84	prparserparse.h
85
86aslcompilerlex.c: aslcompiler.l aslsupport.l
87	${LEX} ${LFLAGS} -PAslCompiler -o${.TARGET} \
88	    ${ACPICA_DIR}/compiler/aslcompiler.l
89
90aslcompiler.y: aslparser.y aslrules.y aslsupport.y asltokens.y asltypes.y
91	m4 -P -I${ACPICA_DIR}/compiler \
92	    ${ACPICA_DIR}/compiler/aslparser.y > ${.TARGET}
93
94.ORDER: aslcompilerparse.c aslcompilerparse.h
95aslcompilerparse.c aslcompilerparse.h: aslcompiler.y
96	${YACC} ${YFLAGS} -pAslCompiler -oaslcompilerparse.c ${.ALLSRC}
97
98aslcompiler.y.h: aslcompilerparse.h
99	ln -f ${.ALLSRC} ${.TARGET}
100
101dtparserlex.c: dtparser.l
102	${LEX} ${LFLAGS} -PDtParser -o${.TARGET} ${.ALLSRC}
103
104.ORDER: dtparserparse.c dtparserparse.h
105dtparserparse.c dtparserparse.h: dtparser.y
106	${YACC} ${YFLAGS} -pDtParser -odtparserparse.c ${.ALLSRC}
107
108dtparser.y.h: dtparserparse.h
109	ln -f ${.ALLSRC} ${.TARGET}
110
111prparserlex.c: prparser.l
112	${LEX} ${LFLAGS} -PPrParser -o${.TARGET} ${.ALLSRC}
113
114.ORDER: prparserparse.c prparserparse.h
115prparserparse.c prparserparse.h: prparser.y
116	${YACC} ${YFLAGS} -pPrParser -oprparserparse.c ${.ALLSRC}
117
118prparser.y.h: prparserparse.h
119	ln -f ${.ALLSRC} ${.TARGET}
120
121.include <bsd.prog.mk>
122