Home | History | Annotate | Line # | Download | only in iasl
Makefile revision 1.15
      1 # $NetBSD: Makefile,v 1.15 2017/09/15 17:17:25 christos Exp $
      2 
      3 .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64")
      4 PROG=	iasl
      5 .endif
      6 BINDIR=	/usr/bin
      7 MAN=	iasl.8
      8 WARNS=	0
      9 TOPDIR=	${NETBSDSRCDIR}/sys/external/bsd/acpica/dist/compiler
     10 
     11 .include <bsd.own.mk>
     12 
     13 CPPFLAGS+=	-I${TOPDIR}/../include -I${TOPDIR} -I.
     14 CPPFLAGS+=	-D__NetBSD__ -DACPI_ASL_COMPILER -DACPI_USE_ALTERNATE_TIMEOUT
     15 CPPFLAGS+=	-D_USE_BERKELEY_YACC
     16 .if ${MKREPRO:Uno} == "yes"
     17 CPPFLAGS+=	-DACPI_REPRO
     18 .endif
     19 LDADD+=		-ll -ly -lrt -lpthread
     20 DPADD+=		${LIBL} ${LIBY} ${LIBRT} ${LIBPTHREAD}
     21 
     22 DPSRCS= aslcompiler.y aslcompilerlex.c aslcompilerparse.c \
     23 	dtparserparse.c dtparserlex.c prparserparse.c prparserlex.c
     24 
     25 .PATH:	${TOPDIR}
     26 SRCS+= \
     27 	adfile.c \
     28 	aslanalyze.c \
     29 	aslascii.c \
     30 	aslbtypes.c \
     31 	aslcodegen.c \
     32 	aslcompile.c \
     33 	aslcompilerlex.c \
     34 	aslcompilerparse.c \
     35 	asldebug.c \
     36 	aslerror.c \
     37 	aslexternal.c \
     38 	aslfileio.c \
     39 	aslfiles.c \
     40 	aslfold.c \
     41 	aslhelp.c \
     42 	aslhex.c \
     43 	asllength.c \
     44 	asllisting.c \
     45 	asllistsup.c \
     46 	aslload.c \
     47 	asllookup.c \
     48 	aslmain.c \
     49 	aslmap.c \
     50 	aslmapenter.c \
     51 	aslmapoutput.c \
     52 	aslmaputils.c \
     53 	aslmessages.c \
     54 	aslmethod.c \
     55 	aslnamesp.c \
     56 	asloffset.c \
     57 	aslopcodes.c \
     58 	asloperands.c \
     59 	aslopt.c \
     60 	asloptions.c \
     61 	aslparseop.c \
     62 	aslpld.c \
     63 	aslpredef.c \
     64 	aslprepkg.c \
     65 	aslprintf.c \
     66 	aslprune.c \
     67 	aslresource.c \
     68 	aslrestype1.c \
     69 	aslrestype1i.c \
     70 	aslrestype2.c \
     71 	aslrestype2d.c \
     72 	aslrestype2e.c \
     73 	aslrestype2q.c \
     74 	aslrestype2s.c \
     75 	aslrestype2w.c \
     76 	aslstartup.c \
     77 	aslstubs.c \
     78 	asltransform.c \
     79 	asltree.c \
     80 	aslutils.c \
     81 	asluuid.c \
     82 	aslwalks.c \
     83 	aslxref.c \
     84 	aslxrefout.c \
     85 	cvcompiler.c \
     86 	cvdisasm.c \
     87 	cvparser.c \
     88 	dtcompile.c \
     89 	dtexpress.c \
     90 	dtfield.c \
     91 	dtio.c \
     92 	dtparserlex.c \
     93 	dtparserparse.c \
     94 	dtsubtable.c \
     95 	dttable.c \
     96 	dttable1.c \
     97 	dttable2.c \
     98 	dttemplate.c \
     99 	dtutils.c \
    100 	prexpress.c \
    101 	prmacros.c \
    102 	prparserlex.c \
    103 	prparserparse.c \
    104 	prscan.c \
    105 	prutils.c
    106 
    107 .PATH: ${TOPDIR}/../common
    108 SRCS+= \
    109 	acfileio.c \
    110 	adisasm.c \
    111 	adwalk.c \
    112 	ahids.c \
    113 	ahpredef.c \
    114 	ahtable.c \
    115 	ahuuids.c \
    116 	cmfsize.c \
    117 	dmextern.c \
    118 	dmrestag.c \
    119 	dmswitch.c \
    120 	dmtable.c \
    121 	dmtables.c \
    122 	dmtbdump.c \
    123 	dmtbinfo.c \
    124 	getopt.c
    125 
    126 .PATH: ${TOPDIR}/../debugger
    127 SRCS+=  dbfileio.c
    128 
    129 .PATH: ${TOPDIR}/../disassembler
    130 SRCS+= \
    131 	dmbuffer.c \
    132 	dmcstyle.c \
    133 	dmdeferred.c \
    134 	dmnames.c \
    135 	dmopcode.c \
    136 	dmresrc.c \
    137 	dmresrcl.c \
    138 	dmresrcl2.c \
    139 	dmresrcs.c \
    140 	dmutils.c \
    141 	dmwalk.c
    142 
    143 .PATH: ${TOPDIR}/../dispatcher
    144 SRCS+= \
    145 	dsargs.c \
    146 	dscontrol.c \
    147 	dsfield.c \
    148 	dsobject.c \
    149 	dsopcode.c \
    150 	dspkginit.c \
    151 	dsutils.c \
    152 	dswexec.c \
    153 	dswload.c \
    154 	dswload2.c \
    155 	dswscope.c \
    156 	dswstate.c
    157 
    158 .PATH: ${TOPDIR}/../executer
    159 SRCS+= \
    160 	exconvrt.c \
    161 	excreate.c \
    162 	exconcat.c \
    163 	exdump.c \
    164 	exmisc.c \
    165 	exmutex.c \
    166 	exnames.c \
    167 	exoparg1.c \
    168 	exoparg2.c \
    169 	exoparg3.c \
    170 	exoparg6.c \
    171 	exprep.c \
    172 	exregion.c \
    173 	exresnte.c \
    174 	exresolv.c \
    175 	exresop.c \
    176 	exstore.c \
    177 	exstoren.c \
    178 	exstorob.c \
    179 	exsystem.c \
    180 	exutils.c
    181 
    182 .PATH: ${TOPDIR}/../parser
    183 SRCS+= \
    184 	psargs.c \
    185 	psloop.c \
    186 	psobject.c \
    187 	psopcode.c \
    188 	psopinfo.c \
    189 	psparse.c \
    190 	psscope.c \
    191 	pstree.c \
    192 	psutils.c \
    193 	pswalk.c
    194 
    195 .PATH: ${TOPDIR}/../tables
    196 SRCS+=	\
    197 	tbfadt.c \
    198 	tbdata.c \
    199 	tbinstal.c \
    200 	tbprint.c \
    201 	tbutils.c \
    202 	tbxface.c \
    203 	tbxfload.c
    204 
    205 .PATH: ${TOPDIR}/../namespace
    206 SRCS+= \
    207 	nsaccess.c \
    208 	nsalloc.c \
    209 	nsdump.c \
    210 	nsnames.c \
    211 	nsobject.c \
    212 	nsparse.c \
    213 	nssearch.c \
    214 	nsutils.c \
    215 	nswalk.c \
    216 	nsxfobj.c \
    217 
    218 .PATH: ${TOPDIR}/../utilities
    219 SRCS+= \
    220 	utaddress.c \
    221 	utalloc.c \
    222 	utascii.c \
    223 	utbuffer.c \
    224 	utcache.c \
    225 	utcopy.c \
    226 	utdebug.c \
    227 	utdecode.c \
    228 	utdelete.c \
    229 	uterror.c \
    230 	utexcep.c \
    231 	utglobal.c \
    232 	uthex.c \
    233 	utinit.c \
    234 	utlock.c \
    235 	utmath.c \
    236 	utmisc.c \
    237 	utmutex.c \
    238 	utnonansi.c \
    239 	utobject.c \
    240 	utosi.c \
    241 	utownerid.c \
    242 	utpredef.c \
    243 	utresdecode.c \
    244 	utresrc.c \
    245 	utstate.c \
    246 	utstring.c \
    247 	utstrsuppt.c \
    248 	utstrtoul64.c \
    249 	utuuid.c \
    250 	utxface.c \
    251 	utxferror.c
    252 
    253 #	utprint.c 
    254 
    255 .PATH: ${TOPDIR}/../os_specific/service_layers
    256 SRCS+=	osunixxf.c
    257 
    258 
    259 aslparser.y: asltokens.y asltypes.y aslrules.y aslsupport.y
    260 
    261 aslcompiler.y: aslparser.y
    262 	${TOOL_M4} -P -I${TOPDIR} ${.ALLSRC} > ${.TARGET}
    263 
    264 aslcompiler.y.h aslcompilerparse.c: aslcompiler.y
    265 	${YACC} -v -d -o${.TARGET} -pAslCompiler ${.ALLSRC}
    266 	mv -f ${.PREFIX}.h aslcompiler.y.h
    267 
    268 aslcompilerlex.c: ${TOPDIR}/aslcompiler.l
    269 	${LEX} -i -PAslCompiler -o${.TARGET} ${.ALLSRC}
    270 
    271 aslcompilerlex.o: aslcompiler.y.h
    272 
    273 dtparser.y.h dtparserparse.c: ${TOPDIR}/dtparser.y
    274 	${YACC} -v -d -o${.TARGET} -pDtParser ${.ALLSRC}
    275 	mv -f ${.PREFIX}.h dtparser.y.h
    276 
    277 dtparserlex.c: ${TOPDIR}/dtparser.l
    278 	${LEX} -i -PDtParser -o${.TARGET} ${.ALLSRC}
    279 
    280 dtparserlex.o: dtparser.y.h
    281 
    282 prparser.y.h prparserparse.c: ${TOPDIR}/prparser.y
    283 	${YACC} -v -d -o${.TARGET} -pPrParser ${.ALLSRC}
    284 	mv -f ${.PREFIX}.h prparser.y.h
    285 
    286 prparserlex.c: ${TOPDIR}/prparser.l
    287 	${LEX} -i -PPrParser -o${.TARGET} ${.ALLSRC}
    288 
    289 prparserlex.o: prparser.y.h
    290 
    291 CLEANFILES+=	aslcompiler.y 				\
    292 		aslcompilerlex.c aslcompilerparse.c	\
    293 		aslcompiler.y.h aslcompilerparse.output \
    294 		dtparserlex.c dtparserparse.c		\
    295 		dtparser.y.h dtparserparse.output	\
    296 		prparserlex.c prparserparse.c		\
    297 		prparser.y.h prparserparse.output	\
    298 
    299 .include <bsd.prog.mk>
    300