2 # (C) Copyright 2002-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # SPDX-License-Identifier: GPL-2.0+
8 # fw_printenv is supposed to run on the target system, which means it should be
9 # built with cross tools. Although it may look weird, we only replace "HOSTCC"
10 # with "CC" here for the maximum code reuse of scripts/Makefile.host.
13 # Compile for a hosted environment on the target
14 HOST_EXTRACFLAGS
= $(patsubst -I
%,-idirafter
%, $(UBOOTINCLUDE
)) \
15 -idirafter
$(srctree
)/tools
/env \
17 -DTEXT_BASE
=$(TEXT_BASE
)
19 ifeq ($(MTD_VERSION
),old
)
20 HOST_EXTRACFLAGS
+= -DMTD_OLD
24 hostprogs-y
:= fw_printenv_unstripped
26 fw_printenv_unstripped-objs
:= fw_env.o fw_env_main.o \
27 crc32.o ctype.o linux_string.o \
28 env_attr.o env_flags.o aes.o
30 quiet_cmd_strip
= STRIP
$@
31 cmd_strip
= $(STRIP
) -o
$@
$<
33 $(obj
)/fw_printenv
: $(obj
)/fw_printenv_unstripped FORCE
34 $(call if_changed
,strip)