dtc/Makefile

35 lines
555 B
Makefile
Raw Normal View History

2005-06-08 15:18:34 +08:00
TARGETS = dtc
CFLAGS = -Wall -g
BISON = bison
2005-06-08 15:18:34 +08:00
OBJS = dtc.o livetree.o flattree.o data.o treesource.o fstree.o \
dtc-parser.tab.o lex.yy.o
2005-06-08 15:18:34 +08:00
all: $(TARGETS)
dtc: $(OBJS)
$(LINK.c) -o $@ $^
$(OBJS): dtc.h
dtc-parser.tab.c dtc-parser.tab.h dtc-parser.output: dtc-parser.y
$(BISON) -d -v $<
2005-06-08 15:18:34 +08:00
lex.yy.c: dtc-lexer.l
$(LEX) $<
lex.yy.o: lex.yy.c dtc-parser.tab.h
2005-06-08 15:18:34 +08:00
livetree.o: flat_dt.h
2005-06-08 15:18:34 +08:00
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.*
cd tests && $(MAKE) clean