#######################################################################
# Create and open the main program window.
#
# Copyright (C) 2010 Starbuck<starbuck@labdv.com>
#######################################################################

TEMPLATE = app
QT += network

# Paths
DEPENDPATH += .
INCLUDEPATH += .

CONFIG( debug, debug|release) {

	# debug
	CONFIG -= release
        CONFIG += static
	TARGET = DVDx4g

	win32 {
		DVDx4g.depends = gui4

		DEPENDPATH += ../gui4

		INCLUDEPATH += ../../ext/include
		INCLUDEPATH += ../../msvc/ext

		LIBS += ../../build/win32/debug/lib/job.lib
		LIBS += ../../build/win32/debug/lib/video.lib
		LIBS += ../../build/win32/debug/lib/gui4.lib
		LIBS += ../../build/win32/debug/lib/encoder.lib
		LIBS += ../../build/win32/debug/lib/player.lib

		DESTDIR = ../../build/win32/debug/bin
		OBJECTS_DIR = ../../tmp/win32/debug/gui4/obj
		UI_DIR = ../../tmp/win32/debug/gui4/ui
		MOC_DIR = ../../tmp/win32/debug/gui4/moc
	}

    unix: !macx {	
		DVDx4.depends = gui4 job
		
		QMAKE_LFLAGS += $$(ORIGIN)

		LIBS += ../../build/unix/debug/lib/video_functions.o
		LIBS += ../../build/unix/debug/lib/task.o
		LIBS += ../../build/unix/debug/lib/process.o
		LIBS += ../../build/unix/debug/lib/job.o
		LIBS += ../../build/unix/debug/lib/jobmanager.o

		LIBS += ../../build/unix/debug/lib/libjob.a
		LIBS += ../../build/unix/debug/lib/libvideo.a
		LIBS += ../../build/unix/debug/lib/libgui4.a
		LIBS += ../../build/unix/debug/lib/libencoder.a
		LIBS += ../../build/unix/debug/lib/libplayer.a

		DESTDIR = ../../build/unix/debug/bin
		OBJECTS_DIR = ../../tmp/unix/debug/gui4/obj
		UI_DIR = ../../tmp/unix/debug/gui4/ui
		MOC_DIR = ../../tmp/unix/debug/gui4/mocl
	}

	macx {
		DVDx4.depends = gui4 job

		LIBS += ../../build/macx/debug/lib/libjob.a
		LIBS += ../../build/macx/debug/lib/libvideo.a
		LIBS += ../../build/macx/debug/lib/libgui4.a
		LIBS += ../../build/macx/debug/lib/libencoder.a
		LIBS += ../../build/macx/debug/lib/libplayer.a

		DESTDIR = ../../build/macx/debug/bin
		OBJECTS_DIR = ../../tmp/macx/debug/gui4/obj
		UI_DIR = ../../tmp/macx/debug/gui4/ui
		MOC_DIR = ../../tmp/macx/debug/gui4/moc
	}

} else {

	# release
	CONFIG -= debug
        CONFIG += static link_prl
        TARGET = DVDx4

	win32 {
		RC_FILE += main.rc

		DVDx4.depends = gui4
		DEPENDPATH += ../gui4

		INCLUDEPATH += ../../ext/include
		INCLUDEPATH += ../../msvc/ext

		LIBS += ../../build/win32/release/lib/job.lib
		LIBS += ../../build/win32/release/lib/video.lib
		LIBS += ../../build/win32/release/lib/gui4.lib
		LIBS += ../../build/win32/release/lib/encoder.lib
		LIBS += ../../build/win32/release/lib/player.lib

		DESTDIR = ../../build/win32/release/bin
		OBJECTS_DIR = ../../tmp/win32/release/gui4/obj
		UI_DIR = ../../tmp/win32/release/gui4/ui
		MOC_DIR = ../../tmp/win32/release/gui4/moc
	}

	unix: !macx {
		DVDx4.depends = gui4 job
		
		ICON = dvdx4.icns

		LIBS += ../../build/unix/release/lib/video_functions.o
		LIBS += ../../build/unix/release/lib/task.o
		LIBS += ../../build/unix/release/lib/process.o
		LIBS += ../../build/unix/release/lib/job.o
		LIBS += ../../build/unix/release/lib/jobmanager.o

		LIBS += ../../build/unix/release/lib/libjob.a
		LIBS += ../../build/unix/release/lib/libvideo.a
		LIBS += ../../build/unix/release/lib/libgui4.a
		LIBS += ../../build/unix/release/lib/libencoder.a
		LIBS += ../../build/unix/release/lib/libplayer.a

		DESTDIR = ../../build/unix/release/bin
		OBJECTS_DIR = ../../tmp/unix/release/gui4/obj
		UI_DIR = ../../tmp/unix/release/gui4/ui
		MOC_DIR = ../../tmp/unix/release/gui4/moc
	}

	macx {
                TARGET = "DVDx4 Open Edition"
                DVDx4.depends = gui4 job

		ICON = dvdx4.icns

		LIBS += ../../build/macx/release/lib/libjob.a
		LIBS += ../../build/macx/release/lib/libvideo.a
		LIBS += ../../build/macx/release/lib/libgui4.a
		LIBS += ../../build/macx/release/lib/libencoder.a
		LIBS += ../../build/macx/release/lib/libplayer.a

		DESTDIR = ../../build/macx/release/bin
		OBJECTS_DIR = ../../tmp/macx/release/gui4/obj
		UI_DIR = ../../tmp/macx/release/gui4/ui
		MOC_DIR = ../../tmp/macx/release/gui4/moc
	}

}

#######################################################################
# Input
HEADERS += application.h \
			console.h \
			core.h \
			internalerrors.h \
			macrosapp.h \
			macrosdev.h \
			softwareupdate.h \
			paths.h
SOURCES += application.cpp \
			console.cpp \
			core.cpp \
			softwareupdate.cpp \
			main.cpp 
