Linux build fixes
authorRichard Goedeken <Richard@fascinationsoftware.com>
Thu, 14 Jan 2021 05:27:28 +0000 (21:27 -0800)
committerRichard Goedeken <Richard@fascinationsoftware.com>
Thu, 14 Jan 2021 05:27:28 +0000 (21:27 -0800)
18 files changed:
jaguarcore.mak
res/debug-stepinto.png [moved from res/debug-stepInto.png with 100% similarity]
res/exit.png [moved from res/Exit.png with 100% similarity]
src/LEB128.cpp
src/debugger/DBGManager.cpp
src/debugger/DWARFManager.cpp
src/debugger/DWARFManager.h
src/debugger/ELFManager.cpp
src/debugger/ELFManager.h
src/debugger/HWLABELManager.cpp
src/debugger/debuggertab.cpp
src/debugger/localbrowser.cpp
src/file.cpp
src/gui/configdialog.cpp
src/gui/mainwin.cpp
src/jaguar.h
src/settings.h
virtualjaguar.pro

index aa4971e..2e5b8a1 100644 (file)
@@ -43,6 +43,7 @@ AR      := $(CROSS)ar
 ARFLAGS := -rs\r
 \r
 SDL_CFLAGS = `$(CROSS)sdl-config --cflags`\r
+QT_CFLAGS = -fPIC -I/usr/include/qt5 -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore\r
 DEFINES = -D$(SYSTYPE)\r
 GCC_DEPS = -MMD\r
 \r
@@ -95,6 +96,6 @@ obj/libjaguarcore.a: $(OBJS)
 \r
 obj/%.o: src/%.cpp\r
        @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m"\r
-       $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@\r
+       $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(QT_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@\r
 \r
 -include obj/*.d\r
similarity index 100%
rename from res/Exit.png
rename to res/exit.png
index 159b5f3..d749a8d 100644 (file)
@@ -1,4 +1,4 @@
-
+#include <stdlib.h>
 
 // Decode an unsigned LEB128
 // Algorithm from Appendix C of the DWARF 2, and 3, spec section "7.6"
index 28d1ffe..0dec2c0 100644 (file)
 #include <stdlib.h>\r
 #include <string.h>\r
 #include <stdint.h>\r
-#include "libelf/libelf.h"\r
-#include "libelf/gelf.h"\r
+#include "libelf.h"\r
+#include "gelf.h"\r
 #include "log.h"\r
 #include "ELFManager.h"\r
-#include "DwarfManager.h"\r
+#include "DWARFManager.h"\r
 #include "DBGManager.h"\r
 #include "HWLABELManager.h"\r
 #include "settings.h"\r
@@ -548,7 +548,7 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t
                        break;\r
 \r
                case DBG_ATE_unsigned_char:\r
-                       sprintf(value, "%u", (unsigned int(V.C)));\r
+                       sprintf(value, "%u", (unsigned int) V.C);\r
                        break;\r
 \r
                case DBG_ATE_ptr:\r
index e0e07b9..028b1e4 100644 (file)
@@ -32,7 +32,6 @@
 #include "LEB128.h"\r
 #include "DWARFManager.h"\r
 \r
-\r
 // Definitions for debugging\r
 //#define DEBUG_NumCU                  0x3                             // CU number to debug or undefine it\r
 //#define DEBUG_VariableName   "sound_death"                           // Variable name to look for or undefine it\r
@@ -156,7 +155,7 @@ typedef struct CUStruct
        CUStruct_LineSrc *PtrUsedLinesSrc;                              // Pointer to the used source lines list structure\r
        char **PtrUsedLinesLoadSrc;                                             // Pointer lists to each used source line referenced by the CUStruct_LineSrc structure\r
        size_t *PtrUsedNumLines;                                                // List of the number lines used\r
-       struct _stat _statbuf;                                                  // File information\r
+       struct stat _statbuf;                                                   // File information\r
        DWARFstatus Status;                                                             // File status\r
 }S_CUStruct;\r
 \r
@@ -170,7 +169,7 @@ Dwarf_Debug dbg;
 CUStruct *PtrCU;\r
 char **ListSearchPaths;\r
 size_t NbSearchPaths;\r
-struct _stat FileElfExeInfo;\r
+struct stat FileElfExeInfo;\r
 \r
 \r
 //\r
@@ -250,7 +249,7 @@ bool DWARFManager_Close(void)
 \r
 \r
 // Dwarf manager Elf init\r
-int    DWARFManager_ElfInit(Elf *ElfPtr, struct _stat FileElfInfo)\r
+int    DWARFManager_ElfInit(Elf *ElfPtr, struct stat FileElfInfo)\r
 {\r
        if ((LibDwarf = dwarf_elf_init(ElfPtr, DW_DLC_READ, (Dwarf_Handler)DWARFManager_ErrorHandler, errarg, &dbg, &error)) == DW_DLV_OK)\r
        {\r
@@ -478,10 +477,12 @@ void DWARFManager_InitDMI(void)
                                                                        PtrCU[NbCU].PtrFullFilename = (char *)realloc(PtrCU[NbCU].PtrFullFilename, strlen(PtrCU[NbCU].PtrSourceFilename) + strlen((const char *)ListSearchPaths[i]) + 2);\r
 #if defined(_WIN32)\r
                                                                        sprintf(PtrCU[NbCU].PtrFullFilename, "%s\\%s", ListSearchPaths[i], PtrCU[NbCU].PtrSourceFilename);\r
+                                                                       if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rb"))\r
 #else\r
                                                                        sprintf(PtrCU[NbCU].PtrFullFilename, "%s/%s", ListSearchPaths[i], PtrCU[NbCU].PtrSourceFilename);\r
+                                                                       SrcFile = fopen(PtrCU[NbCU].PtrFullFilename, "rb");\r
+                                                                       if (SrcFile == NULL)\r
 #endif\r
-                                                                       if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rb"))\r
                                                                        {\r
                                                                                PtrCU[NbCU].PtrSourceFileDirectory = (char *)realloc(PtrCU[NbCU].PtrSourceFileDirectory, strlen(ListSearchPaths[i]) + 1);\r
                                                                                strcpy(PtrCU[NbCU].PtrSourceFileDirectory, ListSearchPaths[i]);\r
@@ -535,13 +536,18 @@ void DWARFManager_InitDMI(void)
                                                        }\r
 \r
                                                        // Get the source file information\r
-                                                       if (!_stat(PtrCU[NbCU].PtrFullFilename, &PtrCU[NbCU]._statbuf))\r
+                                                       if (!stat(PtrCU[NbCU].PtrFullFilename, &PtrCU[NbCU]._statbuf))\r
                                                        {\r
                                                                // check the time stamp with the executable\r
                                                                if (PtrCU[NbCU]._statbuf.st_mtime <= FileElfExeInfo.st_mtime)\r
                                                                {\r
                                                                        // Open the source file as a binary file\r
+#if defined(_WIN32)\r
                                                                        if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rb"))\r
+#else\r
+                                    SrcFile = fopen(PtrCU[NbCU].PtrFullFilename, "rb");\r
+                                                                       if (SrcFile == NULL)\r
+#endif\r
                                                                        {\r
                                                                                if (!fseek(SrcFile, 0, SEEK_END))\r
                                                                                {\r
@@ -552,7 +558,11 @@ void DWARFManager_InitDMI(void)
                                                                                                        if (PtrCU[NbCU].PtrLoadSrc = Ptr = Ptr1 = (char *)calloc(1, (PtrCU[NbCU].SizeLoadSrc + 2)))\r
                                                                                                        {\r
                                                                                                                // Read whole file\r
+#if defined(_WIN32)                                                                                                            \r
                                                                                                                if (fread_s(PtrCU[NbCU].PtrLoadSrc, PtrCU[NbCU].SizeLoadSrc, PtrCU[NbCU].SizeLoadSrc, 1, SrcFile) != 1)\r
+#else\r
+                                                                                                               if (fread(PtrCU[NbCU].PtrLoadSrc, PtrCU[NbCU].SizeLoadSrc, 1, SrcFile) != 1)\r
+#endif\r
                                                                                                                {\r
                                                                                                                        free(PtrCU[NbCU].PtrLoadSrc);\r
                                                                                                                        PtrCU[NbCU].PtrLoadSrc = NULL;\r
index a1bcf77..3b2b063 100644 (file)
@@ -18,7 +18,7 @@ typedef enum
 extern bool    DWARFManager_Reset(void);\r
 extern bool    DWARFManager_Close(void);\r
 extern void    DWARFManager_Init(void);\r
-extern int DWARFManager_ElfInit(Elf *ElfPtr, struct _stat FileElfInfo);\r
+extern int DWARFManager_ElfInit(Elf *ElfPtr, struct stat FileElfInfo);\r
 extern void DWARFManager_Set(size_t NbPathsInList, char **PtrListPaths);\r
 extern size_t DWARFManager_GetNbSources(void);\r
 \r
index 459e4b8..69aae73 100644 (file)
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include "libelf/libelf.h"
-#include "libelf/gelf.h"
+#include "libelf.h"
+#include "gelf.h"
 #include "libdwarf.h"
 #include "log.h"
 #include "ELFManager.h"
-#include "DwarfManager.h"
+#include "DWARFManager.h"
 
 
 //#define LOG_SUPPORT                                  // Support log
@@ -147,7 +147,7 @@ void        ELFManager_Init(void)
 
 
 // ELF manager Dwarf Initialisation
-bool   ELFManager_DwarfInit(Elf *PtrElfMem, struct _stat FileElfInfo)
+bool   ELFManager_DwarfInit(Elf *PtrElfMem, struct stat FileElfInfo)
 {
        return (ElfDwarf = (DWARFManager_ElfInit(PtrElfMem, FileElfInfo) == DW_DLV_OK) ? true : false);
 }
index 06caa86..63ed0cb 100644 (file)
@@ -35,7 +35,7 @@ typedef enum {
 
 // Internal manager
 extern void    ELFManager_Init(void);
-extern bool    ELFManager_DwarfInit(Elf *PtrElfMem, struct _stat FileElfInfo);
+extern bool    ELFManager_DwarfInit(Elf *PtrElfMem, struct stat FileElfInfo);
 extern Elf *ELFManager_MemOpen(char *PtrELFExe, size_t Size);
 extern int     ELFManager_MemEnd(void);
 extern void    ELFManager_Reset(void);
index ac69f90..e67e000 100644 (file)
@@ -13,8 +13,8 @@
 \r
 #include <stdlib.h>\r
 #include <string.h>\r
-#include "libelf/libelf.h"\r
-#include "libelf/gelf.h"\r
+#include "libelf.h"\r
+#include "gelf.h"\r
 #include "log.h"\r
 #include "ELFManager.h"\r
 \r
index 0b4bd46..d73f1f0 100644 (file)
@@ -92,7 +92,7 @@ void DebuggerTab::SetSettings(void)
 // Load / Update the tabs dialog from the settings\r
 void DebuggerTab::GetSettings(void)\r
 {\r
-       QVariant v(vjs.nbrdisasmlines);\r
+       QVariant v((qulonglong) vjs.nbrdisasmlines);\r
        nbrdisasmlines->setText(v.toString());\r
        sourcefilesearchpaths->setText(vjs.sourcefilesearchPaths);\r
        displayHWlabels->setChecked(vjs.displayHWlabels);\r
index b00bd70..453fa7c 100644 (file)
@@ -19,6 +19,7 @@
 // To add a filter\r
 //\r
 \r
+#include <stdlib.h>\r
 \r
 #include "debugger/localbrowser.h"\r
 #include "memory.h"\r
@@ -208,7 +209,8 @@ void LocalBrowserWindow::RefreshContents(void)
                                                if ((LocalInfo[i].Op >= DBG_OP_reg0) && (LocalInfo[i].Op <= DBG_OP_reg31))\r
                                                {\r
                                                        LocalInfo[i].PtrCPURegisterName = (char *)CPURegName[(LocalInfo[i].Op - DBG_OP_reg0)];\r
-                                                       PtrValue = itoa(m68k_get_reg(NULL, (m68k_register_t)((size_t)M68K_REG_D0 + (LocalInfo[i].Op - DBG_OP_reg0))), Value1, 10);\r
+                                                       sprintf(Value1, "%d", m68k_get_reg(NULL, (m68k_register_t)((size_t)M68K_REG_D0 + (LocalInfo[i].Op - DBG_OP_reg0))));\r
+                                                       PtrValue = Value1;\r
                                                }\r
                                                else\r
                                                {\r
index 288f97a..50e9af0 100644 (file)
@@ -37,8 +37,8 @@
 #include "universalhdr.h"\r
 #include "unzip.h"\r
 #include "zlib.h"\r
-#include "libelf/libelf.h"\r
-#include "libelf/gelf.h"\r
+#include "libelf.h"\r
+#include "gelf.h"\r
 #include "libdwarf.h"\r
 #include "debugger/ELFManager.h"\r
 #include "debugger/DBGManager.h"\r
@@ -150,7 +150,7 @@ bool JaguarLoadFile(char * path)
        int     DBGType = DBG_NO_TYPE;\r
        bool error;\r
        int err;\r
-       struct _stat _statbuf;\r
+       struct stat _statbuf;\r
 \r
        jaguarROMSize = JaguarLoadROM(buffer, path);\r
 \r
@@ -208,7 +208,7 @@ WriteLog("FILE: Cartridge run address is reported as $%X...\n", jaguarRunAddress
                        if ((elf_version(EV_CURRENT) != EV_NONE) && (ElfMem = ELFManager_MemOpen(PtrELFExe, jaguarROMSize)))\r
                        {\r
                                // get the file information\r
-                               _stat(path, &_statbuf);\r
+                               stat(path, &_statbuf);\r
 \r
                                if (ELFManager_DwarfInit(ElfMem, _statbuf))\r
                                {\r
index 1218bb4..0533cd3 100644 (file)
@@ -25,7 +25,7 @@
 #include "controllerwidget.h"
 #include "generaltab.h"
 #include "modelsbiostab.h"
-#include "KeyBindingsTab.h"
+#include "keybindingstab.h"
 #include "settings.h"
 
 
index 82c6c3c..66897b4 100644 (file)
@@ -93,7 +93,7 @@
 //#include "debugger/VideoWin.h"\r
 //#include "debugger/DasmWin.h"\r
 #include "debugger/SourcesWin.h"\r
-#include "debugger/m68KDasmWin.h"\r
+#include "debugger/m68kDasmWin.h"\r
 #include "debugger/GPUDasmWin.h"\r
 #include "debugger/DSPDasmWin.h"\r
 #include "debugger/memory1browser.h"\r
@@ -2254,7 +2254,7 @@ void MainWin::WriteSettings(void)
        // Write settings from the Debugger mode\r
        settings.beginGroup("debugger");\r
        settings.setValue("DisplayHWLabels", vjs.displayHWlabels);\r
-       settings.setValue("NbrDisasmLines", vjs.nbrdisasmlines);\r
+       settings.setValue("NbrDisasmLines", (qulonglong) vjs.nbrdisasmlines);\r
        settings.setValue("DisasmOpcodes", vjs.disasmopcodes);\r
        settings.setValue("displayFullSourceFilename", vjs.displayFullSourceFilename);\r
        settings.setValue("ELFSectionsCheck", vjs.ELFSectionsCheck);\r
index 76f47db..2669380 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __JAGUAR_H__
 #define __JAGUAR_H__
 
+#include <stdlib.h>
 #include <stdint.h>
 #include "memory.h"                                                    // For "UNKNOWN" enum
 
index 8b7ca16..a41b77d 100644 (file)
@@ -25,6 +25,7 @@
 #define MAX_PATH _MAX_PATH             // Urgh.\r
 #endif\r
 #endif\r
+#include <stdlib.h>\r
 #include <stdint.h>\r
 \r
 #define MaxMemory1BrowserWindow                4\r
index fa4be73..3a422ec 100644 (file)
-#\r
-# Virtual Jaguar Qt project file\r
-#\r
-# by James Hammons\r
-# Copyright (C) 2011 Underground Software\r
-#\r
-# Modified by Jean-Paul Mari\r
-#\r
-# See the README and GPLv3 files for licensing and warranty information\r
-#\r
-# NOTE: M68000 core is built and linked in as a library, so there should be no\r
-#       more problems with using the qmake build system as-is. :-)\r
-#       Other than on the Mac, where it stupidly defaults to making XCode\r
-#       binaries. >:-( Well, we fixed it in the Makefile, by doing platform\r
-#       detection there. :-/\r
-#\r
-\r
-TARGET     = virtualjaguar\r
-CONFIG    += qt warn_on release\r
-# debug\r
-RESOURCES += src/gui/virtualjaguar.qrc\r
-LIBS      += -Lobj -Lsrc/m68000/obj -ljaguarcore -lz -lm68k -llibelf -llibdwarf -lelf\r
-QT        += opengl widgets\r
-\r
-# We stuff all the intermediate crap into obj/ so it won't confuse us mere\r
-# mortals ;-)\r
-OBJECTS_DIR = obj\r
-MOC_DIR     = obj\r
-RCC_DIR     = obj\r
-UI_DIR      = obj\r
-\r
-# Platform specific defines\r
-win32     { DEFINES += __GCCWIN32__ }\r
-else:macx { DEFINES += __GCCUNIX__ __THINK_STUPID__ }\r
-else:unix { DEFINES += __GCCUNIX__ }\r
-\r
-# SDL (to link statically on Mac)\r
-macx { LIBS += `sdl-config --static-libs` }\r
-#else:win32 { LIBS += `$(CROSS)sdl-config --libs` }\r
-#else:win32 { LIBS += `$(CROSS)sdl-config --static-libs` -static-libgcc}\r
-else:win32 { LIBS += `$(CROSS)sdl-config --static-libs` -static -static-libgcc -static-libstdc++ }\r
-else { LIBS += `$(CROSS)sdl-config --libs` }\r
-#else { LIBS += `$(CROSS)sdl-config --static-libs` }\r
-\r
-# Icon on Win32, Mac\r
-#win32 { LIBS += res/vj-ico.o }\r
-#win32 { ICON = res/vj.ico }\r
-#win32 { LIBS += obj/vj.o; $(CROSS)windres -i res/vj.rc -o obj/vj.o --include-dir=./res }\r
-win32 { RC_FILE = res/vj.rc }\r
-macx  { ICON = res/vj-icon.icns }\r
-\r
-# C/C++ flags...\r
-# NOTE: May have to put -Wall back in, but only on non-release cycles. It can\r
-#       cause problems if you're not careful. (Can do this via command line in\r
-#       qmake)\r
-QMAKE_CFLAGS += `$(CROSS)sdl-config --cflags`\r
-QMAKE_CXXFLAGS += `$(CROSS)sdl-config --cflags`\r
-\r
-# Need to add libcdio stuffola (checking/including)...\r
-\r
-# Translations. NB: Nobody has stepped up to do any :-P so these are dummy\r
-# translations\r
-# Removed for now, they interfere with proper running in non-English locales for\r
-# some reason. :-/\r
-#TRANSLATIONS = \\r
-#      virtualjaguar_fr.ts \\r
-#      virtualjaguar_gr.ts\r
-\r
-INCLUDEPATH += \\r
-       src \\r
-       src/debugger \\r
-       src/gui\r
-\r
-DEPENDPATH = \\r
-       src \\r
-       src/debugger \\r
-       src/gui \\r
-       src/gui/debug \\r
-       src/m68000\r
-\r
-# The GUI\r
-\r
-HEADERS = \\r
-       src/gui/about.h \\r
-       src/gui/alpinetab.h \\r
-       src/gui/app.h \\r
-       src/gui/configdialog.h \\r
-       src/gui/controllertab.h \\r
-       src/gui/controllerwidget.h \\r
-       src/gui/filelistmodel.h \\r
-       src/gui/filepicker.h \\r
-       src/gui/filethread.h \\r
-       src/gui/gamepad.h \\r
-       src/gui/generaltab.h \\r
-       src/gui/modelsbiostab.h \       \r
-       src/gui/keybindingstab.h \\r
-       src/gui/glwidget.h \\r
-       src/gui/help.h \\r
-       src/gui/imagedelegate.h \\r
-       src/gui/keygrabber.h \\r
-       src/gui/mainwin.h \\r
-       src/gui/profile.h \\r
-       src/gui/emustatus.h \\r
-       src/gui/debug/cpubrowser.h \\r
-       src/gui/debug/m68kdasmbrowser.h \\r
-       src/gui/debug/memorybrowser.h \\r
-       src/gui/debug/opbrowser.h \\r
-       src/gui/debug/riscdasmbrowser.h \\r
-       src/gui/debug/stackbrowser.h \\r
-       src/gui/debug/hwregsbrowser.h \\r
-       src/debugger/debuggertab.h \\r
-       src/debugger/DasmWin.h \\r
-       src/debugger/m68kDasmWin.h \\r
-       src/debugger/SourcesWin.h \\r
-       src/debugger/SourceCWin.h \\r
-       src/debugger/DBGManager.h \\r
-       src/debugger/DSPDasmWin.h \\r
-       src/debugger/GPUDasmWin.h \\r
-       src/debugger/HWLABELManager.h \\r
-       src/debugger/ELFManager.h \\r
-       src/debugger/allwatchbrowser.h \\r
-       src/debugger/localbrowser.h \\r
-       src/debugger/DWARFManager.h \\r
-       src/debugger/memory1browser.h \\r
-       src/debugger/heapallocatorbrowser.h \\r
-       src/debugger/BreakpointsWin.h \\r
-       src/debugger/VideoWin.h \r
-       src/debugger/FilesrcListWin.h \\r
-       src/debugger/callstackbrowser.h \\r
-       src/debugger/exceptionvectortablebrowser.h \\r
-       src/debugger/NewFnctBreakpointWin.h \\r
-       src/debugger/CartFilesListWin.h \\r
-       src/debugger/SaveDumpAsWin.h \\r
-       src/log.h \\r
-       src/unzip.h \\r
-       src/crc32.h \\r
-       src/settings.h \\r
-       src/file.h \\r
-       src/LEB128.h\r
-\r
-SOURCES = \\r
-       src/gui/about.cpp \\r
-       src/gui/alpinetab.cpp \\r
-       src/gui/app.cpp \\r
-       src/gui/configdialog.cpp \\r
-       src/gui/controllertab.cpp \\r
-       src/gui/controllerwidget.cpp \\r
-       src/gui/filelistmodel.cpp \\r
-       src/gui/filepicker.cpp \\r
-       src/gui/filethread.cpp \\r
-       src/gui/gamepad.cpp \\r
-       src/gui/generaltab.cpp \\r
-       src/gui/modelsbiostab.cpp \\r
-       src/gui/keybindingstab.cpp \\r
-       src/gui/glwidget.cpp \\r
-       src/gui/help.cpp \\r
-       src/gui/imagedelegate.cpp \\r
-       src/gui/keygrabber.cpp \\r
-       src/gui/mainwin.cpp \\r
-       src/gui/profile.cpp \\r
-       src/gui/emustatus.cpp \\r
-       src/gui/debug/cpubrowser.cpp \\r
-       src/gui/debug/m68kdasmbrowser.cpp \\r
-       src/gui/debug/memorybrowser.cpp \\r
-       src/gui/debug/opbrowser.cpp \\r
-       src/gui/debug/riscdasmbrowser.cpp \\r
-       src/gui/debug/stackbrowser.cpp \\r
-       src/gui/debug/hwregsbrowser.cpp \\r
-       src/debugger/debuggertab.cpp \\r
-       src/debugger/DasmWin.cpp \\r
-       src/debugger/m68kDasmWin.cpp \\r
-       src/debugger/SourcesWin.cpp \\r
-       src/debugger/SourceCWin.cpp \\r
-       src/debugger/DBGManager.cpp \\r
-       src/debugger/DSPDasmWin.cpp \\r
-       src/debugger/GPUDasmWin.cpp \\r
-       src/debugger/HWLABELManager.cpp \\r
-       src/debugger/ELFManager.cpp \\r
-       src/debugger/allwatchbrowser.cpp \\r
-       src/debugger/localbrowser.cpp \\r
-       src/debugger/DWARFManager.cpp \\r
-       src/debugger/memory1browser.cpp \\r
-       src/debugger/heapallocatorbrowser.cpp \\r
-       src/debugger/BreakpointsWin.cpp \\r
-       src/debugger/VideoWin.cpp \\r
-       src/debugger/FilesrcListWin.cpp \\r
-       src/debugger/exceptionvectortablebrowser.cpp \\r
-       src/debugger/callstackbrowser.cpp \\r
-       src/debugger/NewFnctBreakpointWin.cpp \\r
-       src/debugger/CartFilesListWin.cpp \\r
-       src/debugger/SaveDumpAsWin.cpp \\r
-       src/log.cpp \\r
-       src/unzip.cpp \\r
-       src/crc32.cpp \\r
-       src/settings.cpp \\r
-       src/file.cpp \\r
-       src/LEB128.cpp\r
-               
\ No newline at end of file
+#
+# Virtual Jaguar Qt project file
+#
+# by James Hammons
+# Copyright (C) 2011 Underground Software
+#
+# Modified by Jean-Paul Mari
+#
+# See the README and GPLv3 files for licensing and warranty information
+#
+# NOTE: M68000 core is built and linked in as a library, so there should be no
+#       more problems with using the qmake build system as-is. :-)
+#       Other than on the Mac, where it stupidly defaults to making XCode
+#       binaries. >:-( Well, we fixed it in the Makefile, by doing platform
+#       detection there. :-/
+#
+
+TARGET     = virtualjaguar
+CONFIG    += qt warn_on release
+# debug
+RESOURCES += src/gui/virtualjaguar.qrc
+LIBS      += -Lobj -Lsrc/m68000/obj -ljaguarcore -lz -lm68k -lelf -ldwarf
+QT        += opengl widgets
+
+# We stuff all the intermediate crap into obj/ so it won't confuse us mere
+# mortals ;-)
+OBJECTS_DIR = obj
+MOC_DIR     = obj
+RCC_DIR     = obj
+UI_DIR      = obj
+
+# Platform specific defines
+win32     { DEFINES += __GCCWIN32__ }
+else:macx { DEFINES += __GCCUNIX__ __THINK_STUPID__ }
+else:unix { DEFINES += __GCCUNIX__ }
+
+# SDL (to link statically on Mac)
+macx { LIBS += `sdl-config --static-libs` }
+#else:win32 { LIBS += `$(CROSS)sdl-config --libs` }
+#else:win32 { LIBS += `$(CROSS)sdl-config --static-libs` -static-libgcc}
+else:win32 { LIBS += `$(CROSS)sdl-config --static-libs` -static -static-libgcc -static-libstdc++ }
+else { LIBS += `$(CROSS)sdl-config --libs` }
+#else { LIBS += `$(CROSS)sdl-config --static-libs` }
+
+# Icon on Win32, Mac
+#win32 { LIBS += res/vj-ico.o }
+#win32 { ICON = res/vj.ico }
+#win32 { LIBS += obj/vj.o; $(CROSS)windres -i res/vj.rc -o obj/vj.o --include-dir=./res }
+win32 { RC_FILE = res/vj.rc }
+macx  { ICON = res/vj-icon.icns }
+
+# C/C++ flags...
+# NOTE: May have to put -Wall back in, but only on non-release cycles. It can
+#       cause problems if you're not careful. (Can do this via command line in
+#       qmake)
+QMAKE_CFLAGS += `$(CROSS)sdl-config --cflags`
+QMAKE_CXXFLAGS += `$(CROSS)sdl-config --cflags`
+
+# Need to add libcdio stuffola (checking/including)...
+
+# Translations. NB: Nobody has stepped up to do any :-P so these are dummy
+# translations
+# Removed for now, they interfere with proper running in non-English locales for
+# some reason. :-/
+#TRANSLATIONS = \
+#      virtualjaguar_fr.ts \
+#      virtualjaguar_gr.ts
+
+INCLUDEPATH += \
+       src \
+       src/debugger \
+       src/gui
+
+DEPENDPATH = \
+       src \
+       src/debugger \
+       src/gui \
+       src/gui/debug \
+       src/m68000
+
+# The GUI
+
+HEADERS = \
+       src/gui/about.h \
+       src/gui/alpinetab.h \
+       src/gui/app.h \
+       src/gui/configdialog.h \
+       src/gui/controllertab.h \
+       src/gui/controllerwidget.h \
+       src/gui/filelistmodel.h \
+       src/gui/filepicker.h \
+       src/gui/filethread.h \
+       src/gui/gamepad.h \
+       src/gui/generaltab.h \
+       src/gui/modelsbiostab.h \       
+       src/gui/keybindingstab.h \
+       src/gui/glwidget.h \
+       src/gui/help.h \
+       src/gui/imagedelegate.h \
+       src/gui/keygrabber.h \
+       src/gui/mainwin.h \
+       src/gui/profile.h \
+       src/gui/emustatus.h \
+       src/gui/debug/cpubrowser.h \
+       src/gui/debug/hwregsblitterbrowser.h \
+       src/gui/debug/m68kdasmbrowser.h \
+       src/gui/debug/memorybrowser.h \
+       src/gui/debug/opbrowser.h \
+       src/gui/debug/riscdasmbrowser.h \
+       src/gui/debug/stackbrowser.h \
+       src/gui/debug/hwregsbrowser.h \
+       src/debugger/debuggertab.h \
+       src/debugger/DasmWin.h \
+       src/debugger/m68kDasmWin.h \
+       src/debugger/SourcesWin.h \
+       src/debugger/SourceCWin.h \
+       src/debugger/DBGManager.h \
+       src/debugger/DSPDasmWin.h \
+       src/debugger/GPUDasmWin.h \
+       src/debugger/HWLABELManager.h \
+       src/debugger/ELFManager.h \
+       src/debugger/allwatchbrowser.h \
+       src/debugger/localbrowser.h \
+       src/debugger/DWARFManager.h \
+       src/debugger/memory1browser.h \
+       src/debugger/heapallocatorbrowser.h \
+       src/debugger/BreakpointsWin.h \
+       src/debugger/VideoWin.h \
+       src/debugger/FilesrcListWin.h \
+       src/debugger/callstackbrowser.h \
+       src/debugger/exceptionvectortablebrowser.h \
+       src/debugger/NewFnctBreakpointWin.h \
+       src/debugger/CartFilesListWin.h \
+       src/debugger/SaveDumpAsWin.h \
+       src/log.h \
+       src/unzip.h \
+       src/crc32.h \
+       src/settings.h \
+       src/file.h \
+       src/LEB128.h
+
+SOURCES = \
+       src/gui/about.cpp \
+       src/gui/alpinetab.cpp \
+       src/gui/app.cpp \
+       src/gui/configdialog.cpp \
+       src/gui/controllertab.cpp \
+       src/gui/controllerwidget.cpp \
+       src/gui/filelistmodel.cpp \
+       src/gui/filepicker.cpp \
+       src/gui/filethread.cpp \
+       src/gui/gamepad.cpp \
+       src/gui/generaltab.cpp \
+       src/gui/modelsbiostab.cpp \
+       src/gui/keybindingstab.cpp \
+       src/gui/glwidget.cpp \
+       src/gui/help.cpp \
+       src/gui/imagedelegate.cpp \
+       src/gui/keygrabber.cpp \
+       src/gui/mainwin.cpp \
+       src/gui/profile.cpp \
+       src/gui/emustatus.cpp \
+       src/gui/debug/cpubrowser.cpp \
+       src/gui/debug/hwregsblitterbrowser.cpp \
+       src/gui/debug/m68kdasmbrowser.cpp \
+       src/gui/debug/memorybrowser.cpp \
+       src/gui/debug/opbrowser.cpp \
+       src/gui/debug/riscdasmbrowser.cpp \
+       src/gui/debug/stackbrowser.cpp \
+       src/gui/debug/hwregsbrowser.cpp \
+       src/debugger/debuggertab.cpp \
+       src/debugger/DasmWin.cpp \
+       src/debugger/m68kDasmWin.cpp \
+       src/debugger/SourcesWin.cpp \
+       src/debugger/SourceCWin.cpp \
+       src/debugger/DBGManager.cpp \
+       src/debugger/DSPDasmWin.cpp \
+       src/debugger/GPUDasmWin.cpp \
+       src/debugger/HWLABELManager.cpp \
+       src/debugger/ELFManager.cpp \
+       src/debugger/allwatchbrowser.cpp \
+       src/debugger/localbrowser.cpp \
+       src/debugger/DWARFManager.cpp \
+       src/debugger/memory1browser.cpp \
+       src/debugger/heapallocatorbrowser.cpp \
+       src/debugger/BreakpointsWin.cpp \
+       src/debugger/VideoWin.cpp \
+       src/debugger/FilesrcListWin.cpp \
+       src/debugger/exceptionvectortablebrowser.cpp \
+       src/debugger/callstackbrowser.cpp \
+       src/debugger/NewFnctBreakpointWin.cpp \
+       src/debugger/CartFilesListWin.cpp \
+       src/debugger/SaveDumpAsWin.cpp \
+       src/log.cpp \
+       src/unzip.cpp \
+       src/crc32.cpp \
+       src/settings.cpp \
+       src/file.cpp \
+       src/LEB128.cpp
+