1# 2# Copyright 2005 Hon Hai Precision Ind. Co. Ltd. 3# All Rights Reserved. 4# No portions of this material shall be reproduced in any form without the 5# written permission of Hon Hai Precision Ind. Co. Ltd. 6# 7# All information contained in this document is Hon Hai Precision Ind. 8# Co. Ltd. company private, proprietary, and trade secret property and 9# are protected by international intellectual property laws and treaties. 10# 11# $Id$ 12# 13# 14# Creater : Jasmine 15# Date : 03/23/2006 16# 17 18CONFIG_UCLIBC=y 19#CONFIG_GLIBC=y 20 21# 22# Paths 23# 24 25# Source bases 26export PLATFORM LINUXDIR LIBDIR USRLIBDIR 27# export CURRENT := $(shell /bin/pwd) 28# export SRCBASE := $(CURRENT)/../../src 29# export Topdir := $(SRCBASE)/.. 30 31# Build platform 32export BUILD := i386-pc-linux-gnu 33export HOSTCC := gcc 34 35# 36# Environment 37# 38PLATFORM=arm 39# /* Fxcn port-S Wins, 0707-09 */ 40# LINUXDIR=$(SRCBASE)/linux/linux 41LINUXDIR=$(BASEDIR)/components/opensource/linux/linux-2.6.36 42# /* Fxcn port-E Wins, 0707-09 */ 43LIBDIR=$(TOOLCHAIN)/lib 44USRLIBDIR=$(TOOLCHAIN)/usr/lib 45 46# 47# Cross-compile environment variables 48# 49 50# Build platform 51export BUILD := i386-pc-linux-gnu 52export HOSTCC := gcc 53 54# uClibc wrapper 55ifeq ($(CONFIG_UCLIBC),y) 56export PLATFORM := $(PLATFORM)-uclibc 57endif 58 59ifeq ($(PLATFORM),mipsel) 60export CROSS_COMPILE := mipsel-linux- 61export CONFIGURE := ./configure mipsel-linux --build=$(BUILD) 62export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/../mipsel-linux && pwd -P) 63endif 64 65ifeq ($(PLATFORM),mipsel-uclibc) 66export CROSS_COMPILE := mipsel-linux-uclibc- 67export CONFIGURE := ./configure mipsel-linux --build=$(BUILD) 68export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/.. && pwd -P) 69endif 70 71ifeq ($(PLATFORM),arm-uclibc) 72export CROSS_COMPILE := arm-brcm-linux-uclibcgnueabi- 73export CONFIGURE := ./configure arm-linux --build=$(BUILD) 74export TOOLCHAIN := $(shell cd $(dir $(shell which $(CROSS_COMPILE)gcc))/.. && pwd -P) 75endif 76 77CFLAGS += -Os 78 79ifeq ($(CONFIG_BCMWPA2),y) 80export CFLAGS += -DBCMWPA2 81endif 82 83export AS = $(CROSS_COMPILE)as 84export LD = $(CROSS_COMPILE)ld 85export CC = $(CROSS_COMPILE)gcc 86export CPP = $(CC) -E 87export AR = $(CROSS_COMPILE)ar 88export NM = $(CROSS_COMPILE)nm 89export STRIP = $(CROSS_COMPILE)strip 90export OBJCOPY = $(CROSS_COMPILE)objcopy 91export OBJDUMP = $(CROSS_COMPILE)objdump 92#export MAKEFILES = $(Topdir)/.config 93export GENKSYMS = /sbin/genksyms 94export DEPMOD = /sbin/depmod 95export MODFLAGS = -DMODULE 96export PERL = perl 97export RANLIB := $(CROSS_COMPILE)ranlib 98export SIZE := $(CROSS_COMPILE)size 99 100# 101# Install and target directories 102# 103 104export PLATFORMDIR := $(SRCBASE)/router/$(PLATFORM) 105export INSTALLDIR := $(PLATFORMDIR)/install 106export TARGETDIR := $(PLATFORMDIR)/target 107 108# /* Fxcn port-S Wins, 0707-09 */ 109# export KERNELRELEASE=2.4.20 110# //---------- 111export KERNELRELEASE=2.6.36 112# /* Fxcn port-E Wins, 0707-09 */ 113export TOPDIR := $(BASEDIR)/components/opensource/linux/linux-2.6.36 114export KERNELPATH := $(BASEDIR)/components/opensource/linux/linux-2.6.36 115export MODPATH := ${TARGETDIR}/lib/modules/${KERNELRELEASE}/kernel 116MODLIB := $(TARGETDIR)/lib/modules/$(KERNELRELEASE) 117export MODLIB 118 119 120ROUTERDIR= $(SRCBASE)/router 121GPLTOPDIR= $(SRCBASE)/../ap/gpl 122export GPLTOPDIR 123export ROUTERDIR 124 125ifeq ($(LINUXDIR), $(BASEDIR)/components/opensource/linux/linux-2.6.36) 126export CFLAGS += -DLINUX26 -DCONFIG_KERNEL_2_6_36 127endif 128