Makefile 979 Bytes
Newer Older
1
#
2
# (C) Copyright 2002-2006
3 4
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
5
# SPDX-License-Identifier:	GPL-2.0+
6 7
#

8 9 10 11 12
# 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)

13
# Compile for a hosted environment on the target
Masahiro Yamada's avatar
Masahiro Yamada committed
14
HOST_EXTRACFLAGS  = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \
15
		-idirafter $(srctree)/tools/env \
16 17
		-DUSE_HOSTCC \
		-DTEXT_BASE=$(TEXT_BASE)
18

19
ifeq ($(MTD_VERSION),old)
20
HOST_EXTRACFLAGS += -DMTD_OLD
21 22
endif

23
always := fw_printenv
24
hostprogs-y := fw_printenv
25

26
fw_printenv-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
29

30 31
quiet_cmd_crosstools_strip = STRIP   $^
      cmd_crosstools_strip = $(STRIP) $^; touch $@
32

33 34 35 36
$(obj)/.strip: $(obj)/fw_printenv
	$(call cmd,crosstools_strip)

always += .strip