#
# User editable file to configure the binary build of the
# Nut/OS web radio application.
#
# For additional information see http://www.ethernut.de/
#
# $Id: Makedefs 20 2009-09-17 09:15:21Z haraldkipp $
#

# *******************************************************************
# ***************** Required global definitions *********************
# *******************************************************************

# Base name of the project.
# The main source file must, and the resulting binary files will
# have this name.
PROJ = webradio

# Web content subdirectory.
# If WEBFILE is defined (see below), then the contents of this
# subdirectory will be converted to a minimalistic file system
# and included in the code.
# The html directory contains a minimal, neutral layout. More
# directories will be added later and may be automatically
# selected for different targets.
WEBDIR = html

# Include system definitions.
include ../Makedefs

# *******************************************************************
# ***************** Target specific definitions *********************
# *******************************************************************

# 
# Elektor Internet Radio make options.
#
# This board provides a VS1053 hardware decoder. The code will
# be BSDL, because there is no need to link the GPL Helix decoder.
#
# Web contents is currently stored in Flash memory, although we
# may use the card socket in any later version.
#
ifeq ($(PLATFORM), ELEKTOR_IR1)
WEBDIR = elektor
WEBFILE= urom.c
endif

#
# AT91SAM7X-EK make options.
#
# We use the Helix decoder with this board. Note, that only 64k
# RAM are available, which is far below the minimum required
# for MP3 streaming over the Internet. Anyway, low bitrates
# may work.
#
# An external DAC is required. The software should run out of the
# box when using the Calypso board, which provides a TLV320AIC23B
# and a text mode LCD.
#
ifeq ($(PLATFORM), AT91SAM7X_EK)
HELIXOBJS= $(LIBDIR)/asmpoly_gcc.o -lnutcontrib
endif

#
# AT91SAM9260-EK make options.
#
# We use the Helix decoder with this board. Thus, parts of the
# code are published under a different license.
#
# An external DAC is required. The software should run out of the
# box when using the Calypso board, which provides a TLV320AIC23B
# and a text mode LCD.
#
ifeq ($(PLATFORM), AT91SAM9260_EK)
WEBDIR = atmel
WEBFILE= urom.c
HELIXOBJS= $(LIBDIR)/asmpoly_gcc.o -lnutcontrib
endif

#
# ETHERNUT 2 make options.
#
# We use the Medianut 2 extension board, which provides a VS1011
# hardware decoder.
#
ifeq ($(PLATFORM), ETHERNUT2)
WEBFILE= urom.c
endif

#
# ETHERNUT 3 make options.
#
# We use the Medianut 2 extension board, which provides a VS1011
# hardware decoder.
#
ifeq ($(PLATFORM), ETHERNUT3)
WEBFILE= urom.c
endif

#
# Add other targets here.
#


# *******************************************************************
# ********************* Global overriders ***************************
# *******************************************************************

#
# Forcibly enable or disable specific options.
#
# These settings can be used to override the hard coded 
# configuration without modifying the source code. However,
# typically there is no need to change anything here. The
# optimal settings for each target are already specified
# in the related header files.
#

# Enable (1) or disable (0) the integrated web server.
#HWDEF += -DUSE_HTTPSERVER=0 

# Enable (1) or disable (0) the integrated discovery server.
#HWDEF += -DUSE_DISCOVERY=0 

# TCP segment size used to stream MP3 data. Should be at least
# 536 and not larger than 1460. Larger values will increase the
# throughput, but will consume more RAM.
#HWDEF += -DSTATION_MAX_SEGSIZE=536
