Makefile 905 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ifeq ($(srctree),)
  2. srctree := $(patsubst %/,%,$(dir $(shell pwd)))
  3. srctree := $(patsubst %/,%,$(dir $(srctree)))
  4. endif
  5. include $(srctree)/tools//scripts/Makefile.include
  6. define allow-override
  7. $(if $(or $(findstring environment,$(origin $(1))),\
  8. $(findstring command line,$(origin $(1)))),,\
  9. $(eval $(1) = $(2)))
  10. endef
  11. $(call allow-override,CC,$(CROSS_COMPILE)gcc)
  12. $(call allow-override,LD,$(CROSS_COMPILE)ld)
  13. ifeq ($(V),1)
  14. Q =
  15. else
  16. Q = @
  17. endif
  18. export Q srctree CC LD
  19. MAKEFLAGS := --no-print-directory
  20. build := -f $(srctree)/tools/build/Makefile.build dir=. obj
  21. all: fixdep
  22. clean:
  23. $(call QUIET_CLEAN, fixdep)
  24. $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
  25. $(Q)rm -f fixdep
  26. $(OUTPUT)fixdep-in.o: FORCE
  27. $(Q)$(MAKE) $(build)=fixdep
  28. $(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
  29. $(QUIET_LINK)$(CC) $(LDFLAGS) -o $@ $<
  30. FORCE:
  31. .PHONY: FORCE