###############################################################################
#
# Siano Mobile Silicon, Inc. 
# MDTV receiver kernel modules. 
# Copyright (C) 2006-2010, Erez Cohen
# 
# This program is free software: you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# 
#  This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
###############################################################################
#
#	File:		MakeEnv
#                                                                      
#	Brief:		
#
###############################################################################

###############################################################################
# Environment Settings
#
# Here you should set your platform enviroment setting needed in order to build
# and install Siano driver linux module. The enviroment seeting consists of :
#
# 1. Siano driver modules
# 2. Source code directory
# 3. Linux kernel directory
# 4. Modules directory
# 5. Udev rules directory
# 6. etc sysctl defaults
# 7. Target host architecture
# 8. Cross compiler tool-chain
# 
###############################################################################

################################################################
# 1. Siano driver modules
#    
#    Set to '1' each module you would like to build within 
#    Siano driver.
#    Set to '0' otherwise.
################################################################

export CONFIG_SMS_HOST_NET_SUBSYS := 0
export CONFIG_SMS_HOST_USB_DRV := 1
export CONFIG_SMS_HOST_SDIO_DRV := 0
export CONFIG_SMS_HOST_SPI_PXA_DRV := 0
export CONFIG_SMS_HOST_I2C_DRV := 0

################################################################
# 3. Modules directory
#    
#    Set here the directory in which Siano driver is
#    located.
################################################################

MODULES_DIR := /lib/modules/$(shell uname -r)/kernel/drivers/media/dvb/siano

################################################################
# 4.Udev rules
#    
#    Set here the directory in which UDEV rulese are located. 
################################################################

UDEV_RULES_DIR := /lib/udev/rules.d

################################################################
# 5.etc sysctl defaults
#    
#    Set here the directory in which etc sysctr default rulese are located. 
################################################################

ETC_CONF_DIR := /etc/sysctl.d

################################################################
# 6. Target host architecture
#
#    Set here the host architecture that Siano driver will
#    run on.  
################################################################

export ARCH := x86
#export ARCH := arm

################################################################
# 7. Cross compiler tool-chain
#
#     Set here the GNU compiler and linker cross-platform
#     prefix.
#     The compiler and linker are interpreted as :
#         CC := $(CROSS_COMPILE)gcc
#         LD := $(CROSS_COMPILE)ld
################################################################

CROSS_COMPILE := 
#CROSS_COMPILE := arm-linux-

###############################################################################
# 
###############################################################################

PWD = $(shell pwd)

###############################################################################
# For arm we need libgcc_s
###############################################################################
ifeq ($(ARCH),"arm")
export G_LDFLAG := -lgcc_s
endif
