xref: /rk3399_rockchip-uboot/tools/env/Makefile (revision dca61f0128a15bfc4fdefbbdb4a5f6c10b0c8f0b)
16aff3115Swdenk#
2f9328639SMarian Balakowicz# (C) Copyright 2002-2006
36aff3115Swdenk# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
46aff3115Swdenk#
56aff3115Swdenk# See file CREDITS for list of people who contributed to this
66aff3115Swdenk# project.
76aff3115Swdenk#
86aff3115Swdenk# This program is free software; you can redistribute it and/or
96aff3115Swdenk# modify it under the terms of the GNU General Public License as
106aff3115Swdenk# published by the Free Software Foundation; either version 2 of
116aff3115Swdenk# the License, or (at your option) any later version.
126aff3115Swdenk#
136aff3115Swdenk# This program is distributed in the hope that it will be useful,
146aff3115Swdenk# but WITHOUT ANY WARRANTY; without even the implied warranty of
156aff3115Swdenk# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
166aff3115Swdenk# GNU General Public License for more details.
176aff3115Swdenk#
186aff3115Swdenk# You should have received a copy of the GNU General Public License
196aff3115Swdenk# along with this program; if not, write to the Free Software
206aff3115Swdenk# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
216aff3115Swdenk# MA 02111-1307 USA
226aff3115Swdenk#
236aff3115Swdenk
24f9328639SMarian Balakowiczinclude $(TOPDIR)/config.mk
25f9328639SMarian Balakowicz
26*dca61f01SAndreas BießmannHOSTSRCS := $(SRCTREE)/lib/crc32.c  fw_env.c  fw_env_main.c
276aff3115SwdenkHEADERS	:= fw_env.h
286aff3115Swdenk
2902bd475eSDaniel Hobi# Compile for a hosted environment on the target
3002bd475eSDaniel HobiHOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
3102bd475eSDaniel Hobi		-idirafter $(OBJTREE)/include2 \
3202bd475eSDaniel Hobi		-idirafter $(OBJTREE)/include \
3302bd475eSDaniel Hobi		-DUSE_HOSTCC
346aff3115Swdenk
356de66b35SMarkus Klotzbücherifeq ($(MTD_VERSION),old)
3602bd475eSDaniel HobiHOSTCPPFLAGS += -DMTD_OLD
376de66b35SMarkus Klotzbücherendif
386de66b35SMarkus Klotzbücher
39f9328639SMarian Balakowiczall:	$(obj)fw_printenv
40f9328639SMarian Balakowicz
4102bd475eSDaniel Hobi# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED
4202bd475eSDaniel Hobi$(obj)fw_printenv:	$(HOSTSRCS) $(HEADERS)
4302bd475eSDaniel Hobi	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS)
446aff3115Swdenk
456aff3115Swdenkclean:
46*dca61f01SAndreas Bießmann	rm -f $(obj)fw_printenv
476aff3115Swdenk
486aff3115Swdenk#########################################################################
496aff3115Swdenk
50f9328639SMarian Balakowiczinclude $(TOPDIR)/rules.mk
516aff3115Swdenk
52f9328639SMarian Balakowiczsinclude $(obj).depend
536aff3115Swdenk
546aff3115Swdenk#########################################################################
55