Makefile.dtc 913 B

12345678910111213141516171819202122232425
  1. # Makefile.dtc
  2. #
  3. # This is not a complete Makefile of itself. Instead, it is designed to
  4. # be easily embeddable into other systems of Makefiles.
  5. #
  6. DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
  7. checks.c
  8. DTC_EXTRA = dtc.h srcpos.h
  9. DTC_LEXFILES = dtc-lexer.l
  10. DTC_BISONFILES = dtc-parser.y
  11. DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
  12. DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
  13. DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)
  14. DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
  15. DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
  16. DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
  17. DTC_CLEANFILES = $(DTC_GEN_ALL)
  18. # We assume the containing Makefile system can do auto-dependencies for most
  19. # things, but we supply the dependencies on generated header files explicitly
  20. $(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))