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