TEMPLATE		= app
#CONFIG			+= silent
TARGET			= edb
DEPENDPATH		+= ./widgets ../include
INCLUDEPATH		+= ./widgets ../include 
RESOURCES		= debugger.qrc
DESTDIR			= ../
target.path		= /bin/
INSTALLS		+= target 

TRANSLATIONS += \
	edb_en.ts

HEADERS += \
	SyntaxHighlighter.h \
	AnalyzerInterface.h \
	API.h \
	ArchProcessor.h \
	ArchProcessorInterface.h \
	ArchTypes.h \
	BinaryInfo.h \
	BinaryString.h \
	Breakpoint.h \
	ByteShiftArray.h \
	ByteStream.h \
	ByteStreamRegion.h \
	CommentServer.h \
	CommentServerInterface.h \
	Configuration.h \
	DebugEventBase.h \
	DebugEvent.h \
	DebugEventHandlerInterface.h \
	DebuggerCoreInterface.h \
	Debugger.h \
	DebuggerMain.h \
	DebuggerOps.h \
	DebuggerPluginInterface.h \
	DebuggerUI.h \
	DialogArguments.h \
	DialogAttach.h \
	DialogInputBinaryString.h \
	DialogInputValue.h \
	DialogMemoryRegions.h \
	DialogOptions.h \
	DialogPlugins.h \
	Expression.h \
	FunctionDB.h \
	FunctionInfo.h \
	MD5.h \
	MemoryRegions.h \
	MemRegion.h \
	OSTypes.h \
	QCategoryList.h \
	QDisassemblyView.h \
	QHexView.h \
	QLongValidator.h \
	QULongValidator.h \
	RecentFileManager.h \
	RegisterViewDelegate.h \
	SessionFileInterface.h \
	ScopedPointer.h \
	State.h \
	SymbolManager.h \
	TabWidget.h \
	Types.h \
	Util.h \
	DataViewInfo.h \
	version.h

FORMS += \
	binarystring.ui \
	debuggerui.ui \
	dialog_arguments.ui \
	dialog_attach.ui \
	dialog_memoryregions.ui \
	dialog_options.ui \
	dialog_inputvalue.ui \
	dialog_inputbinarystring.ui \
	dialog_plugins.ui
	
SOURCES += \
	SyntaxHighlighter.cpp \
	ArchProcessor.cpp \
	BinaryInfo.cpp \
	BinaryString.cpp \
	ByteShiftArray.cpp \
	ByteStreamRegion.cpp \
	CommentServer.cpp \
	Configuration.cpp \
	DebugEvent.cpp \
	Debugger.cpp \
	DebuggerMain.cpp \
	DebuggerOS.cpp \
	DebuggerUI.cpp \
	DialogArguments.cpp \
	DialogAttach.cpp \
	DialogInputBinaryString.cpp \
	DialogInputValue.cpp \
	DialogMemoryRegions.cpp \
	DialogOptions.cpp \
	DialogPlugins.cpp \
	main.cpp \
	MD5.cpp \
	MemoryRegions.cpp \
	MemRegion.cpp \
	QCategoryList.cpp \
	QDisassemblyView.cpp \
	QHexView.cpp \
	QLongValidator.cpp \
	QULongValidator.cpp \
	RecentFileManager.cpp \
	RegisterViewDelegate.cpp \
	State.cpp \
	SymbolManager.cpp \
	DataViewInfo.cpp \
	TabWidget.cpp

unix {
	SOURCES += DialogAttachUNIX.cpp
	HEADERS += DialogAttachUNIX.h
}

unix {
	DEPENDPATH		+= os/unix ../include/os/unix arch/$$QT_ARCH ../include/arch/$$QT_ARCH ../include/arch/$$QT_ARCH/edisassm
	INCLUDEPATH		+= os/unix ../include/os/unix arch/$$QT_ARCH ../include/arch/$$QT_ARCH ../include/arch/$$QT_ARCH/edisassm
}

win32 {
	DEPENDPATH		+= os/win32 ../include/os/win32 arch/i386 ../include/arch/i386 ../include/arch/i386/edisassm
	INCLUDEPATH		+= os/win32 ../include/os/win32 arch/i386 ../include/arch/i386 ../include/arch/i386/edisassm "c:/Program Files (x86)/boost/boost_1_39/"
	DEFINES			+= _CRT_SECURE_NO_WARNINGS
}

win64 {
	DEPENDPATH		+= os/win64 ../include/os/win64 arch/x86_64 ../include/arch/x86_64 ../include/arch/x86_64/edisassm
	INCLUDEPATH		+= os/win64 ../include/os/win64 arch/x86_64 ../include/arch/x86_64 ../include/arch/x86_64/edisassm "c:/Program Files (x86)/boost/boost_1_39/"
	DEFINES			+= _CRT_SECURE_NO_WARNINGS
}

macx {
	DEPENDPATH		+= os/osx ../include/os/osx arch/i386 ../include/arch/i386 ../include/arch/i386/edisassm
	INCLUDEPATH		+= os/osx ../include/os/osx arch/i386 ../include/arch/i386 ../include/arch/i386/edisassm
}


unix {		
	!isEmpty(DEFAULT_PLUGIN_PATH) {
		DEFINES += DEFAULT_PLUGIN_PATH=$$DEFAULT_PLUGIN_PATH
	}
	
	!isEmpty(DEFAULT_SYMBOL_PATH) {
		DEFINES += DEFAULT_SYMBOL_PATH=$$DEFAULT_SYMBOL_PATH
	}
	
	QMAKE_CXXFLAGS += -ansi -pedantic -W -Wall -Wno-long-long
	
	linux-* {
		DEPENDPATH	+= os/unix/linux
		INCLUDEPATH	+= os/unix/linux
	}

	openbsd-* {
		DEPENDPATH	+= os/unix/openbsd
		INCLUDEPATH	+= os/unix/openbsd /usr/local/include
	}
	
	freebsd-* {
		DEPENDPATH	+= os/unix/freebsd
		INCLUDEPATH	+= os/unix/freebsd
	}
	
	linux-g++*:		QMAKE_CXXFLAGS += -fvisibility=hidden
	linux-g++*:		QMAKE_LFLAGS += -rdynamic
	openbsd-g++:	QMAKE_LFLAGS += -lkvm -Wl,--export-dynamic
	freebsd-g++:	QMAKE_LFLAGS += -lkvm
	
    debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
    release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared

    debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
    release:MOC_DIR = $${OUT_PWD}/.moc/release-shared

    RCC_DIR = $${OUT_PWD}/.rcc
    UI_DIR = $${OUT_PWD}/.uic
}


macx:QMAKE_LFLAGS += -rdynamic


