######################################################################
# Automatically generated by qmake (2.00a) Fri Sep 15 19:35:58 2006
######################################################################

TEMPLATE		=	app
TARGET			=	BASIC256
DEPENDPATH		+=	.
INCLUDEPATH		+=	.
TMAKE_CXXFLAGS = -g 
CONFIG          	+=  qt debug_and_release
OBJECTS_DIR		=	tmp/obj
MOC_DIR			=	tmp/moc
QT			+=	webkit
RESOURCES		+=	resources/resource.qrc
RC_FILE         =   resources/basic256.rc
TRANSLATIONS	=	Translations/basic256_en_US.ts \
		        	Translations/basic256_de.ts \
		        	Translations/basic256_ru_RU.ts \
		        	Translations/basic256_sp.ts \
		        	Translations/basic256_nl.ts
LIBS			+= -lsqlite3

win32 {
	# use SAPI for speech
	DEFINES 		+= WIN32
	DEFINES 		+= USEQSOUND
	LIBS			+= -lole32 \
				-lsapi \
				-lws2_32 \
				-lwinmm


}

unix:!macx {
	## this is the LINUX (unix-non-mac)
	DEFINES		+= LINUX
	
	## TTS Option 1 - ececute 'espak' command to speak 
	#DEFINES		+= 	LINUX_ESPEAK_EXECUTE

	## TTS Option 2 - use the espeak library
	DEFINES		+= 	LINUX_ESPEAK
	INCLUDEPATH		+=	/usr/include/espeak
	LIBS			+=	-lespeak

	## TTS Option 3 - use the flite library
	#DEFINES			+= 	LINUX_FLITE
	#INCLUDEPATH		+=	/usr/include/flite
	#LIBS			+=	-lflite_cmu_us_kal16
	#LIBS			+=	-lflite
	#LIBS			+=	-lflite_cmulex
	#LIBS			+=	-lflite_usenglish
	
	LIBS			+=	-lm

	## include libraries for SDL audio for wav and sound output
	DEFINES 		+= USESDL
	LIBS			+= -lSDL
	LIBS			+= -lSDL_mixer

	## rules for make install
	examplesDiceFiles.files = ./Examples/dice/*.kbs \
				./Examples/dice/*.wav
	examplesDiceFiles.path = /usr/share/basic256/Examples/dice
	INSTALLS += examplesDiceFiles
	examplesImgloadFiles.files = ./Examples/imgload/*.kbs \
				./Examples/imgload/*.png \
				./Examples/imgload/*.bmp
	examplesImgloadFiles.path = /usr/share/basic256/Examples/imgload
	INSTALLS += examplesImgloadFiles
	examplesNetworkingFiles.files = ./Examples/networking/*.kbs
	examplesNetworkingFiles.path = /usr/share/basic256/Examples/networking
	INSTALLS += examplesNetworkingFiles
	examplesSpritesFiles.files = ./Examples/sprites/*.kbs \
				./Examples/sprites/*.wav \
				./Examples/sprites/*.png \
				./Examples/sprites/*.bmp
	examplesSpritesFiles.path = /usr/share/basic256/Examples/sprites
	INSTALLS += examplesSpritesFiles
	examplesTestingFiles.files = ./Examples/testing/*.kbs
	examplesTestingFiles.path = /usr/share/basic256/Examples/testing
	INSTALLS += examplesTestingFiles
	examplesFiles.files = ./Examples/*.kbs
	examplesFiles.path = /usr/share/basic256/Examples
	INSTALLS += examplesFiles
	transFiles.files = ./Translations/*.qm
	transFiles.path = /usr/share/basic256
	INSTALLS += transFiles
	# EN - english help files
	helpENFiles.files = ../doc/help/en/*.html \
		./help/en/*.css \
		./help/en/*.png \
		./help/en/*.jpg
	helpENFiles.path = /usr/share/basic256/help/en
	INSTALLS += helpENFiles
	# DE - german help files
	helpDEFiles.files = ../doc/help/de/*.html \
		./help/de/*.css \
		./help/de/*.png \
		./help/de/*.jpg
	helpDEFiles.path = /usr/share/basic256/help/de
	INSTALLS += helpDEFiles
	# ES - spanish help files
	helpESFiles.files = ../doc/help/es/*.html \
		./help/es/*.css \
		./help/es/*.png \
		./help/es/*.jpg
	helpESFiles.path = /usr/share/basic256/help/es
	INSTALLS += helpESFiles
	# FR - french help files
	helpFRFiles.files = ../doc/help/fr/*.html \
		./help/fr/*.css \
		./help/fr/*.png \
		./help/fr/*.jpg
	helpFRFiles.path = /usr/share/basic256/help/fr
	INSTALLS += helpFRFiles
	# RU - russian help files
	helpRUFiles.files = ../doc/help/ru/*.html \
		./help/ru/*.css \
		./help/ru/*.png \
		./help/ru/*.jpg
	helpRUFiles.path = /usr/share/basic256/help/ru
	INSTALLS += helpRUFiles
	# all language translation files
	transFiles.files = ./Translations/*.qm
	transFiles.path = /usr/share/basic256
	INSTALLS += transFiles
	# main program executable
	target.path = /usr/local/bin
	INSTALLS += target

}

macx {
	# macintosh
	DEFINES +=	MACX
	
	DEFINES +=  MACX_SAY
	
	ICON = resources/basic256.icns

	LIBS			+= -L/opt/local/lib
	INCLUDEPATH		+=	/opt/local/include

	## include libraries for SDL audio for wav and sound output
	DEFINES 		+= USESDL
	LIBS			+= -lSDL
	LIBS			+= -lSDL_mixer

	
}

exists( ./LEX/Makefile ) {
	message( Running make for ./LEX/Makefile )
	system( make -C ./LEX )
}
else { 
	error( Couldn't make LEX project - aborting... )
}


# Input
HEADERS 		+= 	LEX/basicParse.tab.h 
HEADERS 		+= 	BasicEdit.h 
HEADERS 		+= 	Interpreter.h 
HEADERS 		+= 	RunController.h 
HEADERS 		+= 	BasicOutput.h 
HEADERS 		+= 	BasicGraph.h 
HEADERS 		+= 	ErrorCodes.h 
HEADERS 		+= 	GhostButton.h 
HEADERS 		+= 	PauseButton.h 
HEADERS 		+= 	DockWidget.h
HEADERS			+=	BasicWidget.h
HEADERS			+=	ToolBar.h
HEADERS			+=	ViewWidgetIFace.h
HEADERS			+=	MainWindow.h
HEADERS			+=	Variables.h
HEADERS			+=	VariableWin.h
HEADERS			+=	DocumentationWin.h
HEADERS			+=	Version.h
HEADERS			+=	EditSyntaxHighlighter.h
HEADERS			+=	Stack.h
HEADERS			+=	PreferencesWin.h
HEADERS			+=	FindWin.h
HEADERS			+=	ReplaceWin.h
HEADERS			+=	md5.h

SOURCES 		+= 	LEX/lex.yy.c 
SOURCES 		+= 	LEX/basicParse.tab.c 
SOURCES 		+= 	BasicEdit.cpp 
SOURCES 		+= 	Interpreter.cpp 
SOURCES 		+= 	RunController.cpp 
SOURCES 		+= 	Main.cpp 
SOURCES 		+= 	BasicOutput.cpp 
SOURCES 		+= 	BasicGraph.cpp 
SOURCES 		+= 	GhostButton.cpp 
SOURCES 		+= 	PauseButton.cpp 
SOURCES 		+= 	DockWidget.cpp
SOURCES			+=	BasicWidget.cpp
SOURCES			+=	ToolBar.cpp
SOURCES			+=	ViewWidgetIFace.cpp
SOURCES			+=	MainWindow.cpp
SOURCES			+=	Variables.cpp
SOURCES			+=	VariableWin.cpp
SOURCES			+=	DocumentationWin.cpp
SOURCES			+=	EditSyntaxHighlighter.cpp
SOURCES			+=	Stack.cpp
SOURCES			+=	PreferencesWin.cpp
SOURCES			+=	FindWin.cpp
SOURCES			+=	ReplaceWin.cpp
SOURCES			+=	md5.cpp

