aboutsummaryrefslogtreecommitdiffstats
path: root/package/grub
Commit message (Expand)AuthorAgeFilesLines
* package/grub: add a prereq check for 32 bits host development files when buil...Nicolas Thill2010-08-161-0/+11
* grub: compile fixes for Mac OS X (based on patches by Jukka Ylitalo)Felix Fietkau2010-05-284-0/+118
* package/grub: only disable graphics on host grubNicolas Thill2010-05-041-1/+1
* package/grub: build a host grub and a target grub (#7269) - use the host grub...Nicolas Thill2010-05-021-50/+41
* package/grub: fix x86_64 issue (closes #7248)Alexandros C. Couloumbis2010-04-301-0/+3
* package/grub: fix cross compile optionsAlexandros C. Couloumbis2010-04-271-4/+1
* package/grub: play it safe, cross compile everywhereAlexandros C. Couloumbis2010-04-071-10/+0
* refresh grub patchesImre Kaloz2010-02-181-219/+195
* grub: fix potential build issues on redhat/fedora host systems (should close:...Nicolas Thill2009-05-042-2/+24
* get rid of $Id$ - it has never helped us and it has broken too many patches ;)Felix Fietkau2009-04-171-1/+0
* make grub compilable under fedora core 8 and other newer distrosFelix Fietkau2008-08-021-0/+2
* x86: don't attempt to compile grub on darwinFelix Fietkau2008-06-281-0/+2
* grub: Natively build grub only on x86 linux hosts, cross compile everywhere e...Andy Boyett2008-06-201-4/+10
* more package submenusJohn Crispin2007-10-181-1/+0
* move grub menu.lst to the right placeFelix Fietkau2007-10-091-15/+0
* move grub to package/Felix Fietkau2007-10-093-0/+4587
amespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# 
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

-include $(TOPDIR)/.config
include $(TOPDIR)/include/verbose.mk

export SHELL=/usr/bin/env bash -c '. $(TOPDIR)/include/shell.sh; eval "$$2"' --

ARCH:=$(strip $(subst ",, $(CONFIG_ARCH)))
TARGET_OPTIMIZATION:=$(strip $(subst ",, $(CONFIG_TARGET_OPTIMIZATION)))
WGET:=$(strip $(subst ",, $(CONFIG_WGET)))
#"))"))")) # fix vim's broken syntax highlighting

OPTIMIZE_FOR_CPU:=$(ARCH)

# DIRECTORIES #

DL_DIR:=$(TOPDIR)/dl
INCLUDE_DIR:=$(TOPDIR)/include
SCRIPT_DIR:=$(TOPDIR)/scripts
TOOL_BUILD_DIR:=$(TOPDIR)/tool_build
TOOLCHAIN_BUILD_DIR:=$(TOPDIR)/toolchain_build_$(ARCH)
STAGING_DIR:=$(TOPDIR)/staging_dir_$(ARCH)
BIN_DIR:=$(TOPDIR)/bin
PACKAGE_DIR:=$(BIN_DIR)/packages
IPKG_TARGET_DIR:=$(PACKAGE_DIR)
BUILD_DIR:=$(TOPDIR)/build_$(ARCH)
TMP_DIR:=$(TOPDIR)/tmp
STAMP_DIR:=$(BUILD_DIR)/stamp
TARGET_DIR:=$(BUILD_DIR)/root
IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/ipkg

ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
  REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
  GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
  TARGET_CROSS:=$(OPTIMIZE_FOR_CPU)-linux-uclibc-
endif

IMAGE:=$(BUILD_DIR)/root_fs_$(ARCH)

TARGET_PATH:=$(STAGING_DIR)/usr/bin:$(STAGING_DIR)/bin:$(PATH)
TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)

export PATH:=$(TARGET_PATH)

LINUX_DIR:=$(BUILD_DIR)/linux
LINUX_HEADERS_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux

# APPLICATIONS #
HOSTCC:=gcc
TARGET_CC:=$(TARGET_CROSS)gcc
STRIP:=$(STAGING_DIR)/bin/sstrip
PATCH:=$(SCRIPT_DIR)/patch-kernel.sh
SED:=$(STAGING_DIR)/bin/sed -i -e
CP:=cp -fpR

ifneq ($(CONFIG_CCACHE),)
  # FIXME: move this variable to a better location
  export CCACHE_DIR=$(STAGING_DIR)/ccache
  TARGET_CC:= ccache $(TARGET_CC)
endif

TARGET_CONFIGURE_OPTS:= \
  AR=$(TARGET_CROSS)ar \
  AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
  LD=$(TARGET_CROSS)ld \
  NM=$(TARGET_CROSS)nm \
  CC="$(TARGET_CC)" \
  GCC="$(TARGET_CC)" \
  CXX=$(TARGET_CROSS)g++ \
  RANLIB=$(TARGET_CROSS)ranlib \
  STRIP=$(TARGET_CROSS)strip

# strip an entire directory
RSTRIP:= \
  STRIP="$(STRIP)" \
  STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" \
  $(SCRIPT_DIR)/rstrip.sh

# where to build (and put) .ipk packages
IPKG:= \
  PATH="$(STAGING_DIR)/bin:$(PATH)" \
  IPKG_TMP=$(BUILD_DIR)/tmp \
  IPKG_INSTROOT=$(TARGET_DIR) \
  IPKG_CONF_DIR=$(STAGING_DIR)/etc \
  IPKG_OFFLINE_ROOT=$(BUILD_DIR)/root \
  $(SCRIPT_DIR)/ipkg -force-defaults -force-depends

# invoke ipkg-build with some default options
IPKG_BUILD:= \
  ipkg-build -c -o 0 -g 0

ifeq ($(CONFIG_ENABLE_LOCALE),true)
  DISABLE_NLS:=
else
  DISABLE_NLS:=--disable-nls
endif

ifneq ($(CONFIG_LARGEFILE),y)
  DISABLE_LARGEFILE= --disable-largefile
endif

ifeq ($(CONFIG_TAR_VERBOSITY),y)
  TAR_OPTIONS:=-xvf -
else
  TAR_OPTIONS:=-xf -
endif

define shvar
V_$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
endef

define shexport
$(call shvar,$(1))=$$(call $(1))
export $(call shvar,$(1))
endef


all:
FORCE: ;
.PHONY: FORCE
%: ;