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*30fd4fadSJoe HershbergerHOSTSRCS += $(SRCTREE)/lib/ctype.c $(SRCTREE)/lib/linux_string.c 28*30fd4fadSJoe HershbergerHOSTSRCS += $(SRCTREE)/common/env_attr.c $(SRCTREE)/common/env_flags.c 29497f2053SJoe HershbergerHEADERS := fw_env.h $(OBJTREE)/include/config.h 306aff3115Swdenk 3102bd475eSDaniel Hobi# Compile for a hosted environment on the target 3202bd475eSDaniel HobiHOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ 3302bd475eSDaniel Hobi -idirafter $(OBJTREE)/include2 \ 3402bd475eSDaniel Hobi -idirafter $(OBJTREE)/include \ 35*30fd4fadSJoe Hershberger -idirafter $(SRCTREE)/tools/env \ 36497f2053SJoe Hershberger -DUSE_HOSTCC \ 37497f2053SJoe Hershberger -DTEXT_BASE=$(TEXT_BASE) 386aff3115Swdenk 396de66b35SMarkus Klotzbücherifeq ($(MTD_VERSION),old) 4002bd475eSDaniel HobiHOSTCPPFLAGS += -DMTD_OLD 416de66b35SMarkus Klotzbücherendif 426de66b35SMarkus Klotzbücher 43f9328639SMarian Balakowiczall: $(obj)fw_printenv 44f9328639SMarian Balakowicz 4502bd475eSDaniel Hobi# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED 4602bd475eSDaniel Hobi$(obj)fw_printenv: $(HOSTSRCS) $(HEADERS) 4702bd475eSDaniel Hobi $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS) 483648ff2dSLoïc Minier $(HOSTSTRIP) $@ 496aff3115Swdenk 506aff3115Swdenkclean: 51dca61f01SAndreas Bießmann rm -f $(obj)fw_printenv 526aff3115Swdenk 536aff3115Swdenk######################################################################### 546aff3115Swdenk 55f9328639SMarian Balakowiczinclude $(TOPDIR)/rules.mk 566aff3115Swdenk 57f9328639SMarian Balakowiczsinclude $(obj).depend 586aff3115Swdenk 596aff3115Swdenk######################################################################### 60