#
# All application Makefiles should define the following macros:
#
#   NETOS_DIR       :  relative path to the "netos" toplevel
#   BUILD_RAM_IMAGE :  set to "0" if not desired, and to "1"
#                      if desired (and supported by platform)
#   BUILD_ROM_IMAGE :  set to "0" if not desired, and to "1"
#                      if desired (and supported by platform)
#   APP_C_FILES     :  list of application specific "C" files
#                      (must all have a ".c" suffix)
#   APP_C_FLAGS     :  application specific CFLAGS
#   APP_CC_FILES    :  list of application specific "C++" files
#                      (must all have either a ".cc", ".C", or ".cxx" suffix)
#   APP_CC_FLAGS    :  application specific CFLAGS for C++ compilation
#   APP_ASM_FILES   :  list of application specific assembly files
#                      (must all have either a ".s", ".S", or ".arm" suffix)
#   APP_ASM_FLAGS   :  application specific ASFLAGS for assembly
#   APP_INCDIRS     :  list of application specific include directories
#                      in "-I.." format.
#
#   APP_DESCRIPTION :  Simple one line description of application
#                      (for applicable platforms, will be incorporated
#                      into the binary VPD)
#
#   USE_SIMPLE_WEB_SERVER : set to "1" if desired (used for compatibility
#                           with older examples... links against a different
#                           set of libraries)
#
#   INCLUDE_CXX_STARTUP : set to "1" to include C++ initialization libraries
#
#   APP_OBJ_FILES   :  An optional veriable which can specify "extra"
#                      objects to be linked into an image which are
#                      not derived from c, c++, or assembly.  The
#                      application Makefile bears the burden of providing
#                      rules to build these files if necessary.
#
# The application Makefile should also include VPATH specifications
# for all application source.
#

NETOS_DIR= ../../../..

BUILD_RAM_IMAGE= 1
BUILD_ROM_IMAGE= 0

APP_DESCRIPTION="Digi Weather Station Demo"

vpath %.c ..
vpath %.c ../pbuilder
vpath %.c ../pbuilder/html
vpath %.c ../weather
vpath %.c ../syslog
vpath %.c $(NETOS_DIR)/src/rphttpd

NAFTP_CODE_FILE := naftpapp.c

ifneq (,$(findstring :$(PLATFORM):,:connectme_lsk:))
#vpath %.c $(NETOS_DIR)/connect/src/naftpapp
#NAFTP_CODE_FILE := naftpapp_connect.c
error PLATFORM: $(PLATFORM) not currently supported
endif

APP_C_FILES=root.c      \
	man_app.c	\
	wcid.c		\
	wci_protocol.c	\
	RpUsrDct.c 	\
	RpPages.c 	\
	systemSecurity.c \
	weatherParams.c \
	dgWeatherStation.c \
	cgi.c 		\
	file.c		\
	atod20.c	\
	cnt1d.c		\
	crcutil.c	\
	ds2480ut.c	\
	findtype.c	\
	ioutil.c	\
	mweather.c	\
	netoslnk.c	\
	owerr.c		\
	owllu.c		\
	ownetu.c	\
	owsesu.c	\
	owtrnu.c	\
	swt12.c		\
	temp.c		\
	temp10.c	\
	weather.c	\
	$(NAFTP_CODE_FILE) \
	back.c		\
	back_off.c	\
	company_logo.c	\
	forward.c	\
	forward_off.c	\
	home.c		\
	home_v.c	\
	logout.c	\
	logout_v.c	\
	logout_status.c	\
	logout_status_v.c \
	network.c	\
	network_v.c	\
	reboot.c	\
	reboot_v.c	\
	reboot_status.c	\
	reboot_status_v.c \
	security.c	\
	security_v.c	\
	stylesheet.c	\
	stylesheet_v.c	\
	syslog.c	\
	syslog_v.c	\
	tabclose.c	\
	tabopen.c	\
	weatherApplet.c \
	weatherApplet_v.c \
	WeatherGUI.c	\
	webWeather.c	\
	webWeather_v.c	\
	web_globals.c   \
	validation.c	\
	validation_v.c 	\
	utils.c		\
	utils_v.c	\
	errhandler.c	\
	errhandler_v.c	\
	dgSyslog.c	\
	wsPageNotFound.c \
	wsPageNotFound_v.c \
	wsPageNoAccess.c \
	wsPageNoAccess_v.c \
	weatherSimulator.c

APP_CC_FILES=
APP_ASM_FILES=

APP_C_FLAGS=  -Wall -DWS_FW_VERSION=\"release_C2\"
APP_CC_FLAGS=
APP_ASM_FLAGS=


APP_INCDIRS= -I.. -I../pbuilder	-I$(NETOSDIR)/src/bsp/h	-I$(NETOSDIR)/src/bsp/platforms/$(PLATFORM)

# List of libraries needed for the application.
APP_LIBS =  $(NETOS_LIBPATH)/librphttpd.a \
            $(NETOS_LIBPATH)/libmanapi.a \
            $(NETOS_BSPLIBPATH)/libbsp.a \
            $(NETOS_LIBPATH)/libflash.a \
            $(NETOS_LIBPATH)/libposix.a \
            $(NETOS_LIBPATH)/libtx.a \
            $(NETOS_LIBPATH)/libdnsclnt.a \
            $(NETOS_LIBPATH)/libaddp.a \
            $(NETOS_LIBPATH)/libtcpip.a	\
	    $(NETOS_LIBPATH)/libftpsvr.a 
	    
	    
# If this applciation is to be run in WEATHER_STATION mode the following line needs to be uncommented, 
# so that file system libary is included in teh building of the application.
#APP_LIBS += $(NETOS_LIBPATH)/libfilesys.a


# must include fast IP library for NET+OS 6.3. NET+OS 7.0, however no longers supports Fast IP	    
# comment out the following lien if building this applciation under NET+OS 7.0
APP_LIBS += $(NETOS_LIBPATH)/libfastip.a

     
            
ifneq ($(findstring $(PLATFORM), connectwime connectwiem),)
APP_LIBS += $(NETOS_LIBPATH)/libwpa.a $(NETOS_LIBPATH)/libcrypto.a $(NETOS_LIBPATH)/libssl.a 
endif	    


#
# All "required" elements must be supplied prior to including the
# "core" Makefile and targets.
#

include $(NETOS_DIR)/src/linkerScripts/Makefile.app.inc


#
# Application specific macros and targets can go below here.
#

#
# Add NET+OS libraries needed for the application.
#
