xref: /rk3399_rockchip-uboot/tools/env/Makefile (revision 02bd475e343582b3c915b94ef4016d5876d4a4f1)
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*02bd475eSDaniel HobiHOSTSRCS := $(obj)crc32.c  fw_env.c  fw_env_main.c
276aff3115SwdenkHEADERS	:= fw_env.h
286aff3115Swdenk
29*02bd475eSDaniel Hobi# Compile for a hosted environment on the target
30*02bd475eSDaniel HobiHOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
31*02bd475eSDaniel Hobi                -idirafter $(OBJTREE)/include2 \
32*02bd475eSDaniel Hobi                -idirafter $(OBJTREE)/include \
33*02bd475eSDaniel Hobi                -DUSE_HOSTCC
346aff3115Swdenk
356de66b35SMarkus Klotzbücherifeq ($(MTD_VERSION),old)
36*02bd475eSDaniel HobiHOSTCPPFLAGS += -DMTD_OLD
376de66b35SMarkus Klotzbücherendif
386de66b35SMarkus Klotzbücher
39f9328639SMarian Balakowiczall:	$(obj)fw_printenv
40f9328639SMarian Balakowicz
41*02bd475eSDaniel Hobi# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED
42*02bd475eSDaniel Hobi$(obj)fw_printenv:	$(HOSTSRCS) $(HEADERS)
43*02bd475eSDaniel Hobi	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS)
446aff3115Swdenk
456aff3115Swdenkclean:
46f9328639SMarian Balakowicz	rm -f $(obj)fw_printenv $(obj)crc32.c
476aff3115Swdenk
48f9328639SMarian Balakowicz$(obj)crc32.c:
4978acc472SPeter Tyser	ln -s $(src)../../lib/crc32.c $(obj)crc32.c
506aff3115Swdenk
516aff3115Swdenk#########################################################################
526aff3115Swdenk
53f9328639SMarian Balakowiczinclude $(TOPDIR)/rules.mk
546aff3115Swdenk
55f9328639SMarian Balakowiczsinclude $(obj).depend
566aff3115Swdenk
576aff3115Swdenk#########################################################################
58