From: Richard Goedeken Date: Thu, 14 Jan 2021 05:27:28 +0000 (-0800) Subject: Linux build fixes X-Git-Tag: v2.1.3-R5^2~25^2 X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/commitdiff_plain/c89f8ff7f28e8eff5f59113640736d3bde8c3313 Linux build fixes --- diff --git a/jaguarcore.mak b/jaguarcore.mak index aa4971e..2e5b8a1 100644 --- a/jaguarcore.mak +++ b/jaguarcore.mak @@ -43,6 +43,7 @@ AR := $(CROSS)ar ARFLAGS := -rs SDL_CFLAGS = `$(CROSS)sdl-config --cflags` +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 DEFINES = -D$(SYSTYPE) GCC_DEPS = -MMD @@ -95,6 +96,6 @@ obj/libjaguarcore.a: $(OBJS) obj/%.o: src/%.cpp @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m" - $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@ + $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(QT_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@ -include obj/*.d diff --git a/res/debug-stepInto.png b/res/debug-stepinto.png similarity index 100% rename from res/debug-stepInto.png rename to res/debug-stepinto.png diff --git a/res/Exit.png b/res/exit.png similarity index 100% rename from res/Exit.png rename to res/exit.png diff --git a/src/LEB128.cpp b/src/LEB128.cpp index 159b5f3..d749a8d 100644 --- a/src/LEB128.cpp +++ b/src/LEB128.cpp @@ -1,4 +1,4 @@ - +#include // Decode an unsigned LEB128 // Algorithm from Appendix C of the DWARF 2, and 3, spec section "7.6" diff --git a/src/debugger/DBGManager.cpp b/src/debugger/DBGManager.cpp index 28d1ffe..0dec2c0 100644 --- a/src/debugger/DBGManager.cpp +++ b/src/debugger/DBGManager.cpp @@ -24,11 +24,11 @@ #include #include #include -#include "libelf/libelf.h" -#include "libelf/gelf.h" +#include "libelf.h" +#include "gelf.h" #include "log.h" #include "ELFManager.h" -#include "DwarfManager.h" +#include "DWARFManager.h" #include "DBGManager.h" #include "HWLABELManager.h" #include "settings.h" @@ -548,7 +548,7 @@ char *DBGManager_GetVariableValueFromAdr(size_t Adr, size_t TypeEncoding, size_t break; case DBG_ATE_unsigned_char: - sprintf(value, "%u", (unsigned int(V.C))); + sprintf(value, "%u", (unsigned int) V.C); break; case DBG_ATE_ptr: diff --git a/src/debugger/DWARFManager.cpp b/src/debugger/DWARFManager.cpp index e0e07b9..028b1e4 100644 --- a/src/debugger/DWARFManager.cpp +++ b/src/debugger/DWARFManager.cpp @@ -32,7 +32,6 @@ #include "LEB128.h" #include "DWARFManager.h" - // Definitions for debugging //#define DEBUG_NumCU 0x3 // CU number to debug or undefine it //#define DEBUG_VariableName "sound_death" // Variable name to look for or undefine it @@ -156,7 +155,7 @@ typedef struct CUStruct CUStruct_LineSrc *PtrUsedLinesSrc; // Pointer to the used source lines list structure char **PtrUsedLinesLoadSrc; // Pointer lists to each used source line referenced by the CUStruct_LineSrc structure size_t *PtrUsedNumLines; // List of the number lines used - struct _stat _statbuf; // File information + struct stat _statbuf; // File information DWARFstatus Status; // File status }S_CUStruct; @@ -170,7 +169,7 @@ Dwarf_Debug dbg; CUStruct *PtrCU; char **ListSearchPaths; size_t NbSearchPaths; -struct _stat FileElfExeInfo; +struct stat FileElfExeInfo; // @@ -250,7 +249,7 @@ bool DWARFManager_Close(void) // Dwarf manager Elf init -int DWARFManager_ElfInit(Elf *ElfPtr, struct _stat FileElfInfo) +int DWARFManager_ElfInit(Elf *ElfPtr, struct stat FileElfInfo) { if ((LibDwarf = dwarf_elf_init(ElfPtr, DW_DLC_READ, (Dwarf_Handler)DWARFManager_ErrorHandler, errarg, &dbg, &error)) == DW_DLV_OK) { @@ -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); #if defined(_WIN32) sprintf(PtrCU[NbCU].PtrFullFilename, "%s\\%s", ListSearchPaths[i], PtrCU[NbCU].PtrSourceFilename); + if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rb")) #else sprintf(PtrCU[NbCU].PtrFullFilename, "%s/%s", ListSearchPaths[i], PtrCU[NbCU].PtrSourceFilename); + SrcFile = fopen(PtrCU[NbCU].PtrFullFilename, "rb"); + if (SrcFile == NULL) #endif - if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rb")) { PtrCU[NbCU].PtrSourceFileDirectory = (char *)realloc(PtrCU[NbCU].PtrSourceFileDirectory, strlen(ListSearchPaths[i]) + 1); strcpy(PtrCU[NbCU].PtrSourceFileDirectory, ListSearchPaths[i]); @@ -535,13 +536,18 @@ void DWARFManager_InitDMI(void) } // Get the source file information - if (!_stat(PtrCU[NbCU].PtrFullFilename, &PtrCU[NbCU]._statbuf)) + if (!stat(PtrCU[NbCU].PtrFullFilename, &PtrCU[NbCU]._statbuf)) { // check the time stamp with the executable if (PtrCU[NbCU]._statbuf.st_mtime <= FileElfExeInfo.st_mtime) { // Open the source file as a binary file +#if defined(_WIN32) if (!fopen_s(&SrcFile, PtrCU[NbCU].PtrFullFilename, "rb")) +#else + SrcFile = fopen(PtrCU[NbCU].PtrFullFilename, "rb"); + if (SrcFile == NULL) +#endif { if (!fseek(SrcFile, 0, SEEK_END)) { @@ -552,7 +558,11 @@ void DWARFManager_InitDMI(void) if (PtrCU[NbCU].PtrLoadSrc = Ptr = Ptr1 = (char *)calloc(1, (PtrCU[NbCU].SizeLoadSrc + 2))) { // Read whole file +#if defined(_WIN32) if (fread_s(PtrCU[NbCU].PtrLoadSrc, PtrCU[NbCU].SizeLoadSrc, PtrCU[NbCU].SizeLoadSrc, 1, SrcFile) != 1) +#else + if (fread(PtrCU[NbCU].PtrLoadSrc, PtrCU[NbCU].SizeLoadSrc, 1, SrcFile) != 1) +#endif { free(PtrCU[NbCU].PtrLoadSrc); PtrCU[NbCU].PtrLoadSrc = NULL; diff --git a/src/debugger/DWARFManager.h b/src/debugger/DWARFManager.h index a1bcf77..3b2b063 100644 --- a/src/debugger/DWARFManager.h +++ b/src/debugger/DWARFManager.h @@ -18,7 +18,7 @@ typedef enum extern bool DWARFManager_Reset(void); extern bool DWARFManager_Close(void); extern void DWARFManager_Init(void); -extern int DWARFManager_ElfInit(Elf *ElfPtr, struct _stat FileElfInfo); +extern int DWARFManager_ElfInit(Elf *ElfPtr, struct stat FileElfInfo); extern void DWARFManager_Set(size_t NbPathsInList, char **PtrListPaths); extern size_t DWARFManager_GetNbSources(void); diff --git a/src/debugger/ELFManager.cpp b/src/debugger/ELFManager.cpp index 459e4b8..69aae73 100644 --- a/src/debugger/ELFManager.cpp +++ b/src/debugger/ELFManager.cpp @@ -17,12 +17,12 @@ #include #include #include -#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); } diff --git a/src/debugger/ELFManager.h b/src/debugger/ELFManager.h index 06caa86..63ed0cb 100644 --- a/src/debugger/ELFManager.h +++ b/src/debugger/ELFManager.h @@ -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); diff --git a/src/debugger/HWLABELManager.cpp b/src/debugger/HWLABELManager.cpp index ac69f90..e67e000 100644 --- a/src/debugger/HWLABELManager.cpp +++ b/src/debugger/HWLABELManager.cpp @@ -13,8 +13,8 @@ #include #include -#include "libelf/libelf.h" -#include "libelf/gelf.h" +#include "libelf.h" +#include "gelf.h" #include "log.h" #include "ELFManager.h" diff --git a/src/debugger/debuggertab.cpp b/src/debugger/debuggertab.cpp index 0b4bd46..d73f1f0 100644 --- a/src/debugger/debuggertab.cpp +++ b/src/debugger/debuggertab.cpp @@ -92,7 +92,7 @@ void DebuggerTab::SetSettings(void) // Load / Update the tabs dialog from the settings void DebuggerTab::GetSettings(void) { - QVariant v(vjs.nbrdisasmlines); + QVariant v((qulonglong) vjs.nbrdisasmlines); nbrdisasmlines->setText(v.toString()); sourcefilesearchpaths->setText(vjs.sourcefilesearchPaths); displayHWlabels->setChecked(vjs.displayHWlabels); diff --git a/src/debugger/localbrowser.cpp b/src/debugger/localbrowser.cpp index b00bd70..453fa7c 100644 --- a/src/debugger/localbrowser.cpp +++ b/src/debugger/localbrowser.cpp @@ -19,6 +19,7 @@ // To add a filter // +#include #include "debugger/localbrowser.h" #include "memory.h" @@ -208,7 +209,8 @@ void LocalBrowserWindow::RefreshContents(void) if ((LocalInfo[i].Op >= DBG_OP_reg0) && (LocalInfo[i].Op <= DBG_OP_reg31)) { LocalInfo[i].PtrCPURegisterName = (char *)CPURegName[(LocalInfo[i].Op - DBG_OP_reg0)]; - PtrValue = itoa(m68k_get_reg(NULL, (m68k_register_t)((size_t)M68K_REG_D0 + (LocalInfo[i].Op - DBG_OP_reg0))), Value1, 10); + sprintf(Value1, "%d", m68k_get_reg(NULL, (m68k_register_t)((size_t)M68K_REG_D0 + (LocalInfo[i].Op - DBG_OP_reg0)))); + PtrValue = Value1; } else { diff --git a/src/file.cpp b/src/file.cpp index 288f97a..50e9af0 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -37,8 +37,8 @@ #include "universalhdr.h" #include "unzip.h" #include "zlib.h" -#include "libelf/libelf.h" -#include "libelf/gelf.h" +#include "libelf.h" +#include "gelf.h" #include "libdwarf.h" #include "debugger/ELFManager.h" #include "debugger/DBGManager.h" @@ -150,7 +150,7 @@ bool JaguarLoadFile(char * path) int DBGType = DBG_NO_TYPE; bool error; int err; - struct _stat _statbuf; + struct stat _statbuf; jaguarROMSize = JaguarLoadROM(buffer, path); @@ -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))) { // get the file information - _stat(path, &_statbuf); + stat(path, &_statbuf); if (ELFManager_DwarfInit(ElfMem, _statbuf)) { diff --git a/src/gui/configdialog.cpp b/src/gui/configdialog.cpp index 1218bb4..0533cd3 100644 --- a/src/gui/configdialog.cpp +++ b/src/gui/configdialog.cpp @@ -25,7 +25,7 @@ #include "controllerwidget.h" #include "generaltab.h" #include "modelsbiostab.h" -#include "KeyBindingsTab.h" +#include "keybindingstab.h" #include "settings.h" diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 82c6c3c..66897b4 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -93,7 +93,7 @@ //#include "debugger/VideoWin.h" //#include "debugger/DasmWin.h" #include "debugger/SourcesWin.h" -#include "debugger/m68KDasmWin.h" +#include "debugger/m68kDasmWin.h" #include "debugger/GPUDasmWin.h" #include "debugger/DSPDasmWin.h" #include "debugger/memory1browser.h" @@ -2254,7 +2254,7 @@ void MainWin::WriteSettings(void) // Write settings from the Debugger mode settings.beginGroup("debugger"); settings.setValue("DisplayHWLabels", vjs.displayHWlabels); - settings.setValue("NbrDisasmLines", vjs.nbrdisasmlines); + settings.setValue("NbrDisasmLines", (qulonglong) vjs.nbrdisasmlines); settings.setValue("DisasmOpcodes", vjs.disasmopcodes); settings.setValue("displayFullSourceFilename", vjs.displayFullSourceFilename); settings.setValue("ELFSectionsCheck", vjs.ELFSectionsCheck); diff --git a/src/jaguar.h b/src/jaguar.h index 76f47db..2669380 100644 --- a/src/jaguar.h +++ b/src/jaguar.h @@ -1,6 +1,7 @@ #ifndef __JAGUAR_H__ #define __JAGUAR_H__ +#include #include #include "memory.h" // For "UNKNOWN" enum diff --git a/src/settings.h b/src/settings.h index 8b7ca16..a41b77d 100644 --- a/src/settings.h +++ b/src/settings.h @@ -25,6 +25,7 @@ #define MAX_PATH _MAX_PATH // Urgh. #endif #endif +#include #include #define MaxMemory1BrowserWindow 4 diff --git a/virtualjaguar.pro b/virtualjaguar.pro index fa4be73..3a422ec 100644 --- a/virtualjaguar.pro +++ b/virtualjaguar.pro @@ -1,198 +1,200 @@ -# -# 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 -llibelf -llibdwarf -lelf -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/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/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 - \ 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 +