]> git.ipfire.org Git - people/ms/u-boot.git/blame - tools/env/Makefile
kbuild: rename SRCTREE to srctree
[people/ms/u-boot.git] / tools / env / Makefile
CommitLineData
6aff3115 1#
f9328639 2# (C) Copyright 2002-2006
6aff3115
WD
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
1a459660 5# SPDX-License-Identifier: GPL-2.0+
6aff3115
WD
6#
7
79fc0c5f
MY
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.
11HOSTCC = $(CC)
12
02bd475e 13# Compile for a hosted environment on the target
fea1ca8e 14HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
01286329 15 -idirafter $(srctree)/tools/env \
497f2053
JH
16 -DUSE_HOSTCC \
17 -DTEXT_BASE=$(TEXT_BASE)
f9328639 18
6de66b35 19ifeq ($(MTD_VERSION),old)
940db16d 20HOST_EXTRACFLAGS += -DMTD_OLD
6de66b35
MK
21endif
22
79fc0c5f
MY
23always := fw_printenv
24hostprogs-y := fw_printenv_unstripped
6aff3115 25
79fc0c5f 26fw_printenv_unstripped-objs := fw_env.o fw_env_main.o \
940db16d
MY
27 crc32.o ctype.o linux_string.o \
28 env_attr.o env_flags.o
79fc0c5f
MY
29
30quiet_cmd_strip = STRIP $@
31 cmd_strip = $(STRIP) -o $@ $<
32
33$(obj)/fw_printenv: $(obj)/fw_printenv_unstripped FORCE
34 $(call if_changed,strip)