You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
689 B

TARGETS = dtc ftdump
20 years ago
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
20 years ago
DEPFILES = $(DTC_OBJS:.o=.d)
20 years ago
all: $(TARGETS)
dtc: $(DTC_OBJS)
$(LINK.c) -o $@ $^
ftdump: ftdump.o
20 years ago
$(LINK.c) -o $@ $^
dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y
$(BISON) -d $<
20 years ago
lex.yy.c: dtc-lexer.l
$(LEX) $<
lex.yy.o: lex.yy.c dtc-parser.tab.h
20 years ago
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
20 years ago
cd tests && $(MAKE) clean
%.d: %.c
$(CC) -MM -MG -MT "$*.o $@" $< > $@
-include $(DEPFILES)