19fffb55fSDavid Gibson# scripts/dtc makefile 29fffb55fSDavid Gibson 39fffb55fSDavid Gibsonhostprogs-y := dtc 49fffb55fSDavid Gibsonalways := $(hostprogs-y) 59fffb55fSDavid Gibson 69fffb55fSDavid Gibsondtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ 7658f29a5SJohn Bonesio srcpos.o checks.o util.o 89fffb55fSDavid Gibsondtc-objs += dtc-lexer.lex.o dtc-parser.tab.o 99fffb55fSDavid Gibson 109fffb55fSDavid Gibson# Source files need to get at the userspace version of libfdt_env.h to compile 119fffb55fSDavid Gibson 129fffb55fSDavid GibsonHOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt 139fffb55fSDavid Gibson 149fffb55fSDavid GibsonHOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC) 159fffb55fSDavid GibsonHOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC) 169fffb55fSDavid GibsonHOSTCFLAGS_dtc.o := $(HOSTCFLAGS_DTC) 179fffb55fSDavid GibsonHOSTCFLAGS_flattree.o := $(HOSTCFLAGS_DTC) 189fffb55fSDavid GibsonHOSTCFLAGS_fstree.o := $(HOSTCFLAGS_DTC) 199fffb55fSDavid GibsonHOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC) 209fffb55fSDavid GibsonHOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC) 219fffb55fSDavid GibsonHOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC) 22658f29a5SJohn BonesioHOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC) 239fffb55fSDavid Gibson 249fffb55fSDavid GibsonHOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC) 259fffb55fSDavid GibsonHOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) 269fffb55fSDavid Gibson 279fffb55fSDavid Gibson# dependencies on generated files need to be listed explicitly 2895abef88SArnaud Lacombe$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h 299fffb55fSDavid Gibson 304f3be1cfSMagnus Damm# generated files need to be cleaned explicitly 314f3be1cfSMagnus Dammclean-files := dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h 32