Makefile revision 208536
1204490Sraj# $FreeBSD: head/gnu/usr.bin/dtc/Makefile 208536 2010-05-25 13:27:55Z raj $ 2204490Sraj 3204490Sraj.include <bsd.own.mk> 4204490Sraj 5204490SrajDTCDIR= ${.CURDIR}/../../../contrib/dtc 6204490SrajLIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt 7204765Sraj.PATH: ${DTCDIR} ${LIBFDTDIR} 8204490Sraj 9204490SrajPROG= dtc 10204490Sraj 11204490SrajSRCS= dtc.c checks.c fstree.c livetree.c treesource.c data.c \ 12204490Sraj flattree.c srcpos.c util.c \ 13204490Sraj fdt.c fdt_ro.c fdt_rw.c fdt_strerror.c \ 14208536Sraj fdt_sw.c fdt_wip.c ${DTCVERSIONFILE} 15204490Sraj 16204490SrajCFLAGS = -Wall -g -Os -fPIC -Wpointer-arith -Wcast-qual 17204490SrajCFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${LIBFDTDIR} 18204490Sraj 19208536SrajVERSIONMAJ!= awk '/^VERSION =/ { print $$3 }' ${DTCDIR}/Makefile 20208536SrajVERSIONMIN!= awk '/^PATCHLEVEL =/ { print $$3 }' ${DTCDIR}/Makefile 21208536SrajVERSIONSUB!= awk '/^SUBLEVEL =/ { print $$3 }' ${DTCDIR}/Makefile 22208536SrajVERSIONEXTRA= 23204490Sraj 24204490SrajDTCVERSION:= ${VERSIONMAJ}.${VERSIONMIN}.${VERSIONSUB}${VERSIONEXTRA} 25208536SrajDTCVERSIONFILE:= version_gen.h 26204490Sraj 27204490SrajMAN= 28204490Sraj 29204490SrajBISON= yacc 30204490SrajLEX= lex 31204490Sraj 32204490SrajOBJS+= dtc-parser.tab.o dtc-lexer.lex.o 33204490Sraj 34204490SrajCLEANFILES+= dtc-parser.tab.o dtc-lexer.lex.o dtc-parser.tab.c \ 35204490Sraj dtc-parser.tab.h dtc-lexer.lex.c ${DTCVERSIONFILE} 36204490Sraj 37208536Sraj${DTCVERSIONFILE}: 38204490Sraj @echo '#define DTC_VERSION "DTC ${DTCVERSION}"' > ${DTCVERSIONFILE} 39204490Sraj 40204490Srajdtc-parser.tab.o: dtc-parser.tab.c dtc-parser.tab.h 41204490Srajdtc-lexer.lex.o: dtc-lexer.lex.c dtc-parser.tab.h 42204490Sraj 43204490Srajdtc-parser.tab.c: dtc-parser.y 44208536Sraj ${BISON} -o$@ -d ${DTCDIR}/dtc-parser.y 45204490Sraj 46204490Srajdtc-parser.tab.h: dtc-parser.tab.c 47204490Sraj 48204490Srajdtc-lexer.lex.c: dtc-lexer.l 49208536Sraj ${LEX} -o$@ ${DTCDIR}/dtc-lexer.l 50204490Sraj 51204490Sraj.include <bsd.prog.mk> 52