xref: /rk3399_rockchip-uboot/tools/env/Makefile (revision 497f2053f8cdd5df412e8dd01db525eb04201ebb)
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
26dca61f01SAndreas BießmannHOSTSRCS := $(SRCTREE)/lib/crc32.c  fw_env.c  fw_env_main.c
27*497f2053SJoe HershbergerHEADERS	:= fw_env.h $(OBJTREE)/include/config.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 \
33*497f2053SJoe Hershberger		-DUSE_HOSTCC \
34*497f2053SJoe Hershberger		-DTEXT_BASE=$(TEXT_BASE)
356aff3115Swdenk
366de66b35SMarkus Klotzbücherifeq ($(MTD_VERSION),old)
3702bd475eSDaniel HobiHOSTCPPFLAGS += -DMTD_OLD
386de66b35SMarkus Klotzbücherendif
396de66b35SMarkus Klotzbücher
40f9328639SMarian Balakowiczall:	$(obj)fw_printenv
41f9328639SMarian Balakowicz
4202bd475eSDaniel Hobi# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED
4302bd475eSDaniel Hobi$(obj)fw_printenv:	$(HOSTSRCS) $(HEADERS)
4402bd475eSDaniel Hobi	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS)
453648ff2dSLoïc Minier	$(HOSTSTRIP) $@
466aff3115Swdenk
476aff3115Swdenkclean:
48dca61f01SAndreas Bießmann	rm -f $(obj)fw_printenv
496aff3115Swdenk
506aff3115Swdenk#########################################################################
516aff3115Swdenk
52f9328639SMarian Balakowiczinclude $(TOPDIR)/rules.mk
536aff3115Swdenk
54f9328639SMarian Balakowiczsinclude $(obj).depend
556aff3115Swdenk
566aff3115Swdenk#########################################################################
57