Makefile 998 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # (C) Copyright 2002-2006
  3. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. #
  5. # SPDX-License-Identifier: GPL-2.0+
  6. #
  7. # fw_printenv is supposed to run on the target system, which means it should be
  8. # built with cross tools. Although it may look weird, we only replace "HOSTCC"
  9. # with "CC" here for the maximum code reuse of scripts/Makefile.host.
  10. HOSTCC = $(CC)
  11. # Compile for a hosted environment on the target
  12. HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \
  13. -idirafter $(srctree)/tools/env \
  14. -DUSE_HOSTCC \
  15. -DTEXT_BASE=$(TEXT_BASE)
  16. ifeq ($(MTD_VERSION),old)
  17. HOST_EXTRACFLAGS += -DMTD_OLD
  18. endif
  19. always := fw_printenv
  20. hostprogs-y := fw_printenv
  21. lib-y += fw_env.o \
  22. crc32.o ctype.o linux_string.o \
  23. env_attr.o env_flags.o aes.o
  24. fw_printenv-objs := fw_env_main.o $(lib-y)
  25. quiet_cmd_crosstools_strip = STRIP $^
  26. cmd_crosstools_strip = $(STRIP) $^; touch $@
  27. $(obj)/.strip: $(obj)/fw_printenv
  28. $(call cmd,crosstools_strip)
  29. always += .strip