]>
Commit | Line | Data |
---|---|---|
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. | |
3b082529 | 11 | override HOSTCC = $(CC) |
79fc0c5f | 12 | |
02bd475e | 13 | # Compile for a hosted environment on the target |
51148790 | 14 | HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ |
01286329 | 15 | -idirafter $(srctree)/tools/env \ |
497f2053 JH |
16 | -DUSE_HOSTCC \ |
17 | -DTEXT_BASE=$(TEXT_BASE) | |
f9328639 | 18 | |
6de66b35 | 19 | ifeq ($(MTD_VERSION),old) |
940db16d | 20 | HOST_EXTRACFLAGS += -DMTD_OLD |
6de66b35 MK |
21 | endif |
22 | ||
79fc0c5f | 23 | always := fw_printenv |
bdc7dc45 | 24 | hostprogs-y := fw_printenv |
6aff3115 | 25 | |
2cb11b35 | 26 | lib-y += fw_env.o \ |
940db16d | 27 | crc32.o ctype.o linux_string.o \ |
c6831c74 | 28 | env_attr.o env_flags.o |
79fc0c5f | 29 | |
2cb11b35 SB |
30 | fw_printenv-objs := fw_env_main.o $(lib-y) |
31 | ||
bdc7dc45 TP |
32 | quiet_cmd_crosstools_strip = STRIP $^ |
33 | cmd_crosstools_strip = $(STRIP) $^; touch $@ | |
79fc0c5f | 34 | |
bdc7dc45 TP |
35 | $(obj)/.strip: $(obj)/fw_printenv |
36 | $(call cmd,crosstools_strip) | |
37 | ||
38 | always += .strip |