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