Makefile 766 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ifeq ($(SRCDIR),)
  2. updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
  3. EXPATDIR := $(call updir,$(CURDIR))
  4. LIBDIR := $(call updir,$(EXPATDIR))
  5. SRCDIR := $(call updir,$(LIBDIR))
  6. BLDDIR := $(SRCDIR)
  7. endif
  8. SUBDIR := lib/expat/gennmtab
  9. include $(BLDDIR)/config.mk
  10. LDFLAGS = $(LADD)
  11. INCLUDES = -I$(BLDDIR) -Isrcdir/lib/util/include
  12. default: all
  13. include $(SRCDIR)/common.mk
  14. .PHONY: all
  15. all: gennmtab
  16. .PHONY: clean
  17. clean: clean-common
  18. rm -f gennmtab
  19. .PHONY: distclean
  20. distclean: clean distclean-common
  21. .PHONY: tags
  22. tags: TAGS
  23. .PHONY: distdir
  24. distdir:
  25. .PHONY: install
  26. install:
  27. .PHONY: dep
  28. dep: dep-common
  29. gennmtab.o:%.o:%.c
  30. $(BUILDTOOL_CC) -c $< -o $@ $(CFLAGS_ALL) $(INCLUDES)
  31. gennmtab:%:%.o
  32. $(BUILDTOOL_CCLD) -o $@ $(LDFLAGS) $^
  33. include depend.mk