Blame view

tools/env/Makefile 954 Bytes
6aff3115b   wdenk   * Use 1-byte-read...
1
  #
f93286397   Marian Balakowicz   Add support for a...
2
  # (C) Copyright 2002-2006
6aff3115b   wdenk   * Use 1-byte-read...
3
4
  # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  #
1a4596601   Wolfgang Denk   Add GPL-2.0+ SPDX...
5
  # SPDX-License-Identifier:	GPL-2.0+
6aff3115b   wdenk   * Use 1-byte-read...
6
  #
79fc0c5f4   Masahiro Yamada   tools/env: cross-...
7
8
9
10
  # fw_printenv is supposed to run on the target system, which means it should be
  # built with cross tools. Although it may look weird, we only replace "HOSTCC"
  # with "CC" here for the maximum code reuse of scripts/Makefile.host.
  HOSTCC = $(CC)
02bd475e3   Daniel Hobi   tools/env: cleanu...
11
  # Compile for a hosted environment on the target
fea1ca8e3   Masahiro Yamada   Makefile: refacto...
12
  HOST_EXTRACFLAGS  = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
30fd4fadb   Joe Hershberger   tools/env: Add en...
13
  		-idirafter $(SRCTREE)/tools/env \
497f2053f   Joe Hershberger   tools/env: Use a ...
14
15
  		-DUSE_HOSTCC \
  		-DTEXT_BASE=$(TEXT_BASE)
f93286397   Marian Balakowicz   Add support for a...
16

6de66b354   Markus Klotzbücher   tools: fix fw_pri...
17
  ifeq ($(MTD_VERSION),old)
940db16d2   Masahiro Yamada   tools: convert ma...
18
  HOST_EXTRACFLAGS += -DMTD_OLD
6de66b354   Markus Klotzbücher   tools: fix fw_pri...
19
  endif
79fc0c5f4   Masahiro Yamada   tools/env: cross-...
20
21
  always := fw_printenv
  hostprogs-y := fw_printenv_unstripped
6aff3115b   wdenk   * Use 1-byte-read...
22

79fc0c5f4   Masahiro Yamada   tools/env: cross-...
23
  fw_printenv_unstripped-objs := fw_env.o fw_env_main.o \
940db16d2   Masahiro Yamada   tools: convert ma...
24
25
  	crc32.o ctype.o linux_string.o \
  	env_attr.o env_flags.o
79fc0c5f4   Masahiro Yamada   tools/env: cross-...
26
27
28
29
30
31
  
  quiet_cmd_strip = STRIP   $@
        cmd_strip = $(STRIP) -o $@ $<
  
  $(obj)/fw_printenv: $(obj)/fw_printenv_unstripped FORCE
  	$(call if_changed,strip)