Home | History | Annotate | Line # | Download | only in conf
dts.mk revision 1.3
      1  1.3  jmcneill # $NetBSD: dts.mk,v 1.3 2017/09/07 21:22:19 jmcneill Exp $
      2  1.3  jmcneill 
      3  1.3  jmcneill DTSARCH?=${MACHINE_CPU}
      4  1.3  jmcneill DTSGNUARCH?=${DTSARCH}
      5  1.3  jmcneill DTSPADDING?=1024
      6  1.1  christos 
      7  1.1  christos DTSINC?=$S/external/gpl2/dts/dist/include
      8  1.3  jmcneill .for _arch in ${DTSARCH}
      9  1.3  jmcneill DTSDIR+=$S/arch/${_arch}/dts
     10  1.3  jmcneill .endfor
     11  1.3  jmcneill .for _arch in ${DTSGNUARCH}
     12  1.3  jmcneill DTSDIR+=$S/external/gpl2/dts/dist/arch/${_arch}/boot/dts
     13  1.3  jmcneill .for _dir in ${DTSSUBDIR}
     14  1.3  jmcneill .if exists($S/external/gpl2/dts/dist/arch/${_arch}/boot/dts/${_dir})
     15  1.3  jmcneill DTSDIR+=$S/external/gpl2/dts/dist/arch/${_arch}/boot/dts/${_dir}
     16  1.3  jmcneill .endif
     17  1.3  jmcneill .endfor
     18  1.3  jmcneill .endfor
     19  1.3  jmcneill 
     20  1.3  jmcneill DTSPATH=${DTSINC} ${DTSDIR}
     21  1.1  christos 
     22  1.1  christos .SUFFIXES: .dtd .dtb .dts
     23  1.1  christos 
     24  1.1  christos .dts.dtd:
     25  1.3  jmcneill 	(${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
     26  1.3  jmcneill 	    -include ${.IMPSRC} /dev/null | \
     27  1.3  jmcneill 	${TOOL_DTC} ${DTSPATH:@v@-i ${v}@} -I dts -O dtb \
     28  1.2  christos 	    -p ${DTSPADDING} -b 0 -o /dev/null -d /dev/stdout | \
     29  1.2  christos 	${TOOL_SED} -e 's@/dev/null@${.TARGET:.dtd=.dtb}@' \
     30  1.2  christos 	    -e 's@<stdin>@${.IMPSRC}@' && \
     31  1.3  jmcneill 	${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
     32  1.3  jmcneill 	    -include ${.IMPSRC} -M /dev/null | \
     33  1.2  christos 	${TOOL_SED} -e 's (a] null.o@${.TARGET:.dtd=.dtb}@' \
     34  1.2  christos 	    -e 's@/dev/null@@') > ${.TARGET}
     35  1.2  christos 
     36  1.1  christos 
     37  1.1  christos .dts.dtb:
     38  1.3  jmcneill 	${CPP} -P -xassembler-with-cpp ${DTSPATH:@v@-I ${v}@} \
     39  1.3  jmcneill 	    -include ${.IMPSRC} /dev/null | \
     40  1.3  jmcneill 	${TOOL_DTC} ${DTSPATH:@v@-i ${v}@} -I dts -O dtb \
     41  1.1  christos 	    -p ${DTSPADDING} -b 0 -o ${.TARGET}
     42  1.1  christos 
     43  1.3  jmcneill .PATH.dts: ${DTSDIR}
     44  1.1  christos 
     45  1.1  christos DEPS+= ${DTS:.dts=.dtd}
     46  1.1  christos DTB= ${DTS:.dts=.dtb}
     47  1.1  christos 
     48  1.1  christos all: ${DTB}
     49