mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-11-22 04:59:14 +01:00
Windows build fixes
This commit is contained in:
parent
f361fddd3e
commit
1037bb5206
@ -78,14 +78,14 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<NMakeBuildCommandLine>make TARGET=$(Configuration) LIB_DIR="$(VC_LibraryPath_VC_x64_Desktop)" UCRT_DIR="$(UniversalCRT_LibraryPath_x64)" SDK_DIR="$(WindowsSDK_LibraryPath)\x64" -j$(NUMBER_OF_PROCESSORS)</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>make TARGET=$(Configuration) clean</NMakeCleanCommandLine>
|
||||
<NMakeBuildCommandLine>make CONFIG=$(Configuration) LIB_DIR="$(VC_LibraryPath_VC_x64_Desktop)" UCRT_DIR="$(UniversalCRT_LibraryPath_x64)" SDK_DIR="$(WindowsSDK_LibraryPath)\x64" -j$(NUMBER_OF_PROCESSORS)</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>make CONFIG=$(Configuration) clean</NMakeCleanCommandLine>
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<NMakeBuildCommandLine>make TARGET=$(Configuration) LIB_DIR="$(VC_LibraryPath_VC_x64_Desktop)" UCRT_DIR="$(UniversalCRT_LibraryPath_x64)" SDK_DIR="$(WindowsSDK_LibraryPath)\x64" -j$(NUMBER_OF_PROCESSORS)</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>make TARGET=$(Configuration) clean</NMakeCleanCommandLine>
|
||||
<NMakeBuildCommandLine>make CONFIG=$(Configuration) LIB_DIR="$(VC_LibraryPath_VC_x64_Desktop)" UCRT_DIR="$(UniversalCRT_LibraryPath_x64)" SDK_DIR="$(WindowsSDK_LibraryPath)\x64" -j$(NUMBER_OF_PROCESSORS)</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>make CONFIG=$(Configuration) clean</NMakeCleanCommandLine>
|
||||
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@ -207,6 +207,7 @@ XCOPY "$(ProjectDir)lib\SDL2-2.24.0\lib\$(Platform)\SDL2.dll" "$(TargetDir)" /S
|
||||
<ClCompile Include="src\eep.cpp" />
|
||||
<ClCompile Include="src\euc-jp.cpp" />
|
||||
<ClCompile Include="src\flash.cpp" />
|
||||
<ClCompile Include="src\main\main.cpp" />
|
||||
<ClCompile Include="src\math_routines.cpp" />
|
||||
<ClCompile Include="src\overlays.cpp" />
|
||||
<ClCompile Include="src\pak.cpp" />
|
||||
|
@ -105,6 +105,9 @@
|
||||
<ClCompile Include="rsp\aspMain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\main\main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\euc-jp.h">
|
||||
|
19
Makefile
19
Makefile
@ -90,15 +90,6 @@ CFLAGS := -ffunction-sections -fdata-sections -march=nehalem $(OPTFLAGS) $(WA
|
||||
CXXFLAGS := -ffunction-sections -fdata-sections -march=nehalem $(OPTFLAGS) $(WARNFLAGS) -std=c++20 -c
|
||||
CPPFLAGS := -Iinclude -Ithirdparty
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LDFLAGS := -v -Wl,/OPT:REF $(OPTFLAGS) $(LIBS) -L"$(LIB_DIR:;=)" -L"$(UCRT_DIR:;=)" -L"$(SDK_DIR:;=)" lib/RT64/$(CONFIG)/RT64.lib
|
||||
else
|
||||
LDFLAGS := $(OPTFLAGS) -L$(BUILD_DIR) -lRecompiledFuncs -L. -lrt64 -lSDL2 -lX11 -Wl,--gc-sections
|
||||
FUNC_CFLAGS += -ffunction-sections -fdata-sections
|
||||
FUNC_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
EXTRA_DEPS := librt64.a
|
||||
endif
|
||||
|
||||
ifeq ($(LIB),1)
|
||||
TARGET := $(BUILD_DIR)/MMRecomp$(DYN_EXT)
|
||||
LDFLAGS += -shared
|
||||
@ -106,6 +97,16 @@ else
|
||||
TARGET := $(BUILD_DIR)/MMRecomp$(EXE_EXT)
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LDFLAGS := -v -Wl,/OPT:REF $(OPTFLAGS) $(LIBS) -L"$(LIB_DIR:;=)" -L"$(UCRT_DIR:;=)" -L"$(SDK_DIR:;=)" lib/RT64/$(CONFIG)/mupen64plus-video-rt64.lib lib/SDL2-2.24.0/lib/x64/SDL2.lib
|
||||
CPPFLAGS += -Ilib/SDL2-2.24.0/include
|
||||
else
|
||||
LDFLAGS := $(OPTFLAGS) -L$(BUILD_DIR) -lRecompiledFuncs -L. -lrt64 -lSDL2 -lX11 -Wl,--gc-sections
|
||||
FUNC_CFLAGS += -ffunction-sections -fdata-sections
|
||||
FUNC_CXXFLAGS += -ffunction-sections -fdata-sections
|
||||
EXTRA_DEPS := librt64.a
|
||||
endif
|
||||
|
||||
default: $(TARGET)
|
||||
|
||||
clean:
|
||||
|
@ -63,11 +63,18 @@ typedef struct {
|
||||
//DLLEXPORT void (CALL *UpdateScreen)(void) = nullptr;
|
||||
//DLLEXPORT void (CALL *PumpEvents)(void) = nullptr;
|
||||
|
||||
#if defined(_WIN32)
|
||||
extern "C" int InitiateGFXWindows(GFX_INFO Gfx_Info, HWND hwnd);
|
||||
#elif defined(__ANDROID__)
|
||||
static_assert(false && "Unimplemented");
|
||||
#elif defined(__linux__)
|
||||
extern "C" int InitiateGFXLinux(GFX_INFO Gfx_Info, Window window, Display *display);
|
||||
#else
|
||||
static_assert(false && "Unimplemented");
|
||||
#endif
|
||||
DLLIMPORT void ProcessRDPList(void);
|
||||
DLLIMPORT void ProcessDList(void);
|
||||
DLLIMPORT void UpdateScreen(void);
|
||||
DLLIMPORT void PumpEvents(void);
|
||||
DLLIMPORT void ChangeWindow(void);
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,8 @@
|
||||
#include "ultra64.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# define NOMINMAX
|
||||
# include <Windows.h>
|
||||
#elif defined(__ANDROID__)
|
||||
# include "android/native_window.h"
|
||||
|
@ -97,7 +97,15 @@ void RT64Init(uint8_t* rom, uint8_t* rdram, Multilibultra::WindowHandle window_h
|
||||
gfx_info.SP_STATUS_REG = &SP_STATUS_REG;
|
||||
gfx_info.RDRAM_SIZE = &RDRAM_SIZE;
|
||||
|
||||
#if defined(_WIN32)
|
||||
InitiateGFXWindows(gfx_info, window_handle);
|
||||
#elif defined(__ANDROID__)
|
||||
static_assert(false && "Unimplemented");
|
||||
#elif defined(__linux__)
|
||||
InitiateGFXLinux(gfx_info, window_handle.window, window_handle.display);
|
||||
#else
|
||||
static_assert(false && "Unimplemented");
|
||||
#endif
|
||||
}
|
||||
|
||||
void RT64SendDL(uint8_t* rdram, const OSTask* task) {
|
||||
|
Loading…
Reference in New Issue
Block a user