From dc6dee046749594497ef65f79d3bf56710baa27d Mon Sep 17 00:00:00 2001 From: Random06457 <28494085+Random06457@users.noreply.github.com> Date: Mon, 2 May 2022 23:05:45 +0900 Subject: [PATCH] Makefile: remove ugly conditions in find commands --- libultraship/Makefile | 3 +-- libultraship/libultraship/WasapiAudioPlayer.cpp | 4 +++- soh/Makefile | 3 +-- soh/src/code/z_camera.c | 2 +- soh/src/code/{z_camera_data.c => z_camera_data.inc} | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename soh/src/code/{z_camera_data.c => z_camera_data.inc} (100%) diff --git a/libultraship/Makefile b/libultraship/Makefile index ab69ff0e0..de375d374 100644 --- a/libultraship/Makefile +++ b/libultraship/Makefile @@ -42,8 +42,7 @@ SRC_DIRS := $(shell find -type d -not -path "*build*") CXX_FILES := \ $(shell find libultraship/Factories -name *.cpp) \ $(shell find libultraship/Lib/Fast3D -name *.cpp) \ - $(shell find libultraship -maxdepth 1 -name *.cpp \ - -and -not -wholename "libultraship/WasapiAudioPlayer.cpp") \ + $(shell find libultraship -maxdepth 1 -name *.cpp) \ $(shell find libultraship/Lib/ImGui -maxdepth 1 -name *.cpp) \ libultraship/Lib/ImGui/backends/imgui_impl_opengl3.cpp \ libultraship/Lib/ImGui/backends/imgui_impl_sdl.cpp \ diff --git a/libultraship/libultraship/WasapiAudioPlayer.cpp b/libultraship/libultraship/WasapiAudioPlayer.cpp index 26e4504d3..30cb10905 100644 --- a/libultraship/libultraship/WasapiAudioPlayer.cpp +++ b/libultraship/libultraship/WasapiAudioPlayer.cpp @@ -1,3 +1,4 @@ +#ifdef _WIN32 #include "WasapiAudioPlayer.h" #include "spdlog/spdlog.h" @@ -169,4 +170,5 @@ namespace Ship { } return S_OK; } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/soh/Makefile b/soh/Makefile index 4b1b0b65b..5731e1165 100644 --- a/soh/Makefile +++ b/soh/Makefile @@ -99,8 +99,7 @@ C_FILES := \ $(shell find soh -type f -name *.c) \ $(shell find src/boot -type f -name *.c) \ $(shell find src/buffers -type f -name *.c) \ - $(shell find src/code -type f -name *.c \ - -and -not -wholename src/code/z_camera_data.c) \ + $(shell find src/code -type f -name *.c) \ $(shell find src/overlays -type f -name *.c) \ src/libultra/gu/coss.c \ src/libultra/gu/guLookAt.c \ diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 7302f9b21..94faf8124 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -26,7 +26,7 @@ s32 Camera_CheckWater(Camera* camera); #define FLG_ADJSLOPE (1 << 0) #define FLG_OFFGROUND (1 << 7) -#include "z_camera_data.c" +#include "z_camera_data.inc" /*===============================================================*/ diff --git a/soh/src/code/z_camera_data.c b/soh/src/code/z_camera_data.inc similarity index 100% rename from soh/src/code/z_camera_data.c rename to soh/src/code/z_camera_data.inc