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