aboutsummaryrefslogtreecommitdiff
path: root/tools/mk_envimg/Makefile
blob: f692ab01c79d31b5506e7f5b26dbad28be05c8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#
# Copyright (C) ST-Ericsson SA 2010
# Author: Rickard Evertsson <rickard.evertsson@stericsson.com>
# for ST-Ericsson.
#
# Influenced by boot/u-boot/tools/env/Makefile
#
# License terms: GNU General Public License (GPL) version 2
#

ifeq ($(SRCTREE),)
SRCTREE := ../..
endif

# Set up default output
ifeq ($(OUTPUT),)
OUTPUT := u-boot-env.img
endif

include $(SRCTREE)/config.mk

ifeq ($(obj),)
obj := $(CURDIR)/
endif

SRCS	:= $(SRCTREE)/lib_generic/crc32.c  mk_env_img.c
HEADERS	:= mk_env_img.h

.PHONY: all

all:	create_envimg

$(obj)mk_envimg:	$(SRCS) $(HEADERS)
	$(HOSTCC) -g -I$(SRCTREE)/include -DUSE_HOSTCC $(SRCS) -o $(obj)mk_envimg

clean:
	rm -f $(obj)mk_envimg $(obj)crc32.c $(OUTPUT)

create_envimg:	$(obj)mk_envimg
	$(obj)mk_envimg $(OUTPUT) $(INPUT)

#########################################################################

include ../../rules.mk

sinclude $(obj)depend

#########################################################################