Makefile 781 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ifeq ($(SRCDIR),)
  2. updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
  3. TOOLSDIR := $(call updir,$(CURDIR))
  4. SRCDIR := $(call updir,$(TOOLSDIR))
  5. BLDDIR := $(SRCDIR)
  6. endif
  7. SUBDIR := tools/lib
  8. default: all
  9. include $(BLDDIR)/config.mk
  10. OMIT_LIB_RULE = Y
  11. include $(SRCDIR)/tools/common.mk
  12. INCLUDES = \
  13. -Isrcdir/$(SUBDIR)/include \
  14. -Iblddir \
  15. -Isrcdir/include \
  16. -Isrcdir/lib/util/include \
  17. LIBOBJS = \
  18. dumpvalue.o \
  19. .PHONY: all
  20. all: $(LIBOBJS)
  21. %.o:%.c
  22. $(CC) -c $(CFLAGS_ALL) $<
  23. # This common.mk dependency makes sure the symlinks get built before
  24. # this make file is used for anything.
  25. $(SRCDIR)/tools/common.mk: srcdir blddir
  26. include depend.mk
  27. .PHONY: dep
  28. dep: dep-common
  29. .PHONY: clean
  30. clean: clean-common
  31. .PHONY: distclean
  32. distclean: clean distclean-common