mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Keeps track of open files in a stack, and assigns a filenum to source positions for each lexical token. Modified error reporting to show source file as well. No policy on file directory basis has been decided. Still handles stdin. Tested on all arch/powerpc/boot/dts DTS files Signed-off-by: Jon Loeliger <jdl@freescale.com>
41 lines
689 B
Makefile
41 lines
689 B
Makefile
TARGETS = dtc ftdump
|
|
CFLAGS = -Wall -g
|
|
|
|
BISON = bison
|
|
|
|
DTC_OBJS = dtc.o flattree.o fstree.o data.o livetree.o \
|
|
srcpos.o treesource.o \
|
|
dtc-parser.tab.o lex.yy.o
|
|
|
|
DEPFILES = $(DTC_OBJS:.o=.d)
|
|
|
|
all: $(TARGETS)
|
|
|
|
dtc: $(DTC_OBJS)
|
|
$(LINK.c) -o $@ $^
|
|
|
|
ftdump: ftdump.o
|
|
$(LINK.c) -o $@ $^
|
|
|
|
dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y
|
|
$(BISON) -d $<
|
|
|
|
lex.yy.c: dtc-lexer.l
|
|
$(LEX) $<
|
|
|
|
lex.yy.o: lex.yy.c dtc-parser.tab.h
|
|
|
|
check: all
|
|
cd tests && $(MAKE) check
|
|
|
|
clean:
|
|
rm -f *~ *.o a.out core $(TARGETS)
|
|
rm -f *.tab.[ch] lex.yy.c
|
|
rm -f *.i *.output vgcore.*
|
|
rm -f *.d
|
|
cd tests && $(MAKE) clean
|
|
|
|
%.d: %.c
|
|
$(CC) -MM -MG -MT "$*.o $@" $< > $@
|
|
|
|
-include $(DEPFILES)
|