From 788efc681411a6537c0de12c6d28cb970adae790 Mon Sep 17 00:00:00 2001 From: Yanis002 <35189056+Yanis002@users.noreply.github.com> Date: Sun, 23 Feb 2025 01:22:15 +0100 Subject: [PATCH] fix build issues --- include/debug/profiler_inline.h | 3 ++- .../debug_opening_state.h | 5 ++++- include/functions.h | 5 ----- include/helpers.h | 5 ++++- include/map_select_state.h | 11 ++++++----- include/occlusionplanes.h | 6 ++++++ include/widescreen.h | 3 +++ src/code/PreRender.c | 1 + src/code/game.c | 1 - src/code/graph.c | 1 + src/code/helpers.c | 3 +++ src/code/sched.c | 2 ++ src/code/sys_math3d_draw.c | 2 ++ src/code/sys_ucode.c | 3 +++ src/code/z_actor.c | 1 + src/code/z_fbdemo_circle.c | 1 + src/code/z_fbdemo_wipe1.c | 1 + src/code/z_game_dlftbls.c | 1 + src/code/z_kanfont.c | 1 + src/code/z_lifemeter.c | 1 + src/code/z_map_exp.c | 1 + src/code/z_map_mark.c | 1 + src/code/z_message.c | 1 + src/code/z_parameter.c | 1 + src/code/z_view.c | 1 + src/debug/profiler.c | 1 + src/libu64/gfxprint.c | 1 + src/libultra/io/pimgr.c | 1 + src/libultra/io/vimgr.c | 1 + src/overlays/actors/ovl_En_Mag/z_en_mag.c | 1 + src/overlays/actors/ovl_End_Title/z_end_title.c | 1 + .../ovl_debug_opening/debug_opening.c | 3 ++- .../gamestates/ovl_file_choose/z_file_choose.c | 1 + src/overlays/gamestates/ovl_select/z_select.c | 15 +++++++++------ src/overlays/gamestates/ovl_title/z_title.c | 2 ++ .../misc/ovl_kaleido_scope/z_kaleido_item.c | 1 + tools/Flips/Makefile | 2 +- tools/Makefile | 4 ++-- tools/assets/Makefile | 8 +++++--- tools/assets/n64texconv/Makefile | 17 +++++++++++------ 40 files changed, 88 insertions(+), 33 deletions(-) rename src/overlays/gamestates/ovl_debug_opening/debug_opening.h => include/debug_opening_state.h (94%) diff --git a/include/debug/profiler_inline.h b/include/debug/profiler_inline.h index c72c175f2..f4859f7e7 100644 --- a/include/debug/profiler_inline.h +++ b/include/debug/profiler_inline.h @@ -2,7 +2,8 @@ #define PROFILER_INLINE_H #include "profiler.h" -#include "../variables.h" +#include "variables.h" +#include "buffers.h" extern void Profiler_RecordEventWithTime(u8 type, OSTime time); extern void Profiler_RecordEvent(u8 type); diff --git a/src/overlays/gamestates/ovl_debug_opening/debug_opening.h b/include/debug_opening_state.h similarity index 94% rename from src/overlays/gamestates/ovl_debug_opening/debug_opening.h rename to include/debug_opening_state.h index ed3cd75b8..a9a24b560 100644 --- a/src/overlays/gamestates/ovl_debug_opening/debug_opening.h +++ b/include/debug_opening_state.h @@ -1,8 +1,11 @@ #ifndef DEBUG_OPENING_H #define DEBUG_OPENING_H -#include "global.h" #include "config.h" +#include "z64game.h" +#include "z64view.h" +#include "z64skybox.h" +#include "z64environment.h" #if IS_DEBUG_BOOT_ENABLED diff --git a/include/functions.h b/include/functions.h index 73fc29867..57ee92d73 100644 --- a/include/functions.h +++ b/include/functions.h @@ -128,11 +128,6 @@ f32 absf(f32); void Regs_InitData(PlayState* play); -#if ENABLE_F3DEX3 -void OcclusionPlane_Draw_Phase(PlayState* play, OcclusionPlanePhase phase); -void OcclusionPlane_Draw_PostCamUpdate(PlayState* play); -#endif - #if ENABLE_PROFILER #include "debug/profiler_inline.h" #endif diff --git a/include/helpers.h b/include/helpers.h index 0c4cbc9e5..f7b80f15b 100644 --- a/include/helpers.h +++ b/include/helpers.h @@ -1,9 +1,12 @@ #ifndef HELPERS_H #define HELPERS_H -#include "z64.h" +#include "ultra64/ultratypes.h" #include "functions.h" #include "config.h" +#include "z64game.h" +#include "z64environment.h" +#include "z64skybox.h" void Helpers_LoadDefinedScene(GameState* gameState); void Helpers_LoadTitleScreen(GameState* gameState); diff --git a/include/map_select_state.h b/include/map_select_state.h index 496a8e8b3..db77156c2 100644 --- a/include/map_select_state.h +++ b/include/map_select_state.h @@ -6,6 +6,7 @@ #include "z64view.h" struct MapSelectState; +struct GfxPrint; typedef struct MapSelectEntry { /* 0x00 */ char* name; @@ -45,10 +46,10 @@ void MapSelect_DrawLoadingScreen(MapSelectState* this); void MapSelect_LoadTitle(MapSelectState* this); void MapSelect_LoadDebugOpening(MapSelectState* this); void MapSelect_LoadGame(MapSelectState* this, s32 entranceIndex); -void MapSelect_PrintMenu(MapSelectState* this, GfxPrint* printer); -void MapSelect_PrintLoadingMessage(MapSelectState* this, GfxPrint* printer, u8 yPos); -void MapSelect_PrintAgeSetting(MapSelectState* this, GfxPrint* printer, s32 age); -void MapSelect_PrintSceneLayerSetting(MapSelectState* this, GfxPrint* printer); -void MapSelect_PrintControls(MapSelectState* this, GfxPrint* printer); +void MapSelect_PrintMenu(MapSelectState* this, struct GfxPrint* printer); +void MapSelect_PrintLoadingMessage(MapSelectState* this, struct GfxPrint* printer, u8 yPos); +void MapSelect_PrintAgeSetting(MapSelectState* this, struct GfxPrint* printer, s32 age); +void MapSelect_PrintSceneLayerSetting(MapSelectState* this, struct GfxPrint* printer); +void MapSelect_PrintControls(MapSelectState* this, struct GfxPrint* printer); #endif diff --git a/include/occlusionplanes.h b/include/occlusionplanes.h index eb75f6b03..d01c492e9 100644 --- a/include/occlusionplanes.h +++ b/include/occlusionplanes.h @@ -3,6 +3,9 @@ #include "ultra64/gbi.h" #include "ultra64/ultratypes.h" +#include "config.h" + +struct PlayState; typedef enum F3DEX3OccMode { F3DEX3_OCC_MODE_AUTO, @@ -25,4 +28,7 @@ typedef enum OcclusionPlaneStoredCmdType { OCCLUSION_PLANE_STORED_CMD_COUNT } OcclusionPlaneStoredCmdType; +void OcclusionPlane_Draw_Phase(struct PlayState* play, OcclusionPlanePhase phase); +void OcclusionPlane_Draw_PostCamUpdate(struct PlayState* play); + #endif // OCCLUSIONPLANES_H diff --git a/include/widescreen.h b/include/widescreen.h index 6bfa9bf2c..ede0a107b 100644 --- a/include/widescreen.h +++ b/include/widescreen.h @@ -1,6 +1,9 @@ #ifndef WIDESCREEN_H #define WIDESCREEN_H +#include "ultra64/ultratypes.h" +#include "z64save.h" + // This file provides macros to handle switching between 4:3 and 16:9 and fixing issues. // It is not meant to be something the users can edit. diff --git a/src/code/PreRender.c b/src/code/PreRender.c index 2e83e0b1a..122cc5872 100644 --- a/src/code/PreRender.c +++ b/src/code/PreRender.c @@ -7,6 +7,7 @@ */ #include "global.h" #include "alloca.h" +#include "sys_ucode.h" void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) { this->widthSave = width; diff --git a/src/code/game.c b/src/code/game.c index b835a3a0f..2d8df9f3f 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -15,7 +15,6 @@ #include "padmgr.h" #include "regs.h" #include "rumble.h" -#include "speed_meter.h" #include "terminal.h" #include "versions.h" #include "vi_mode.h" diff --git a/src/code/graph.c b/src/code/graph.c index 4c05e86b7..bb5106ddc 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -20,6 +20,7 @@ #include "versions.h" #include "z64save.h" #include "z64play.h" +#include "debug_opening_state.h" #include "macros.h" #include "global.h" diff --git a/src/code/helpers.c b/src/code/helpers.c index f10dd990f..780448a0c 100644 --- a/src/code/helpers.c +++ b/src/code/helpers.c @@ -1,4 +1,7 @@ #include "helpers.h" +#include "file_select_state.h" +#include "title_setup_state.h" +#include "map_select_state.h" void Helpers_LoadDefinedScene(GameState* gameState) { if (gSaveContext.fileNum == 0xff) { diff --git a/src/code/sched.c b/src/code/sched.c index 284e13df1..9d856c12e 100644 --- a/src/code/sched.c +++ b/src/code/sched.c @@ -72,6 +72,8 @@ vs32 sSchedDebugPrintfEnabled = false; #define SCHED_DEBUG_PRINTF(format, ...) (void)0 #endif +void SysUcode_LoadNewUcodeIfChanged(); + /** * Set the current framebuffer to the swapbuffer pointed to by the provided cfb */ diff --git a/src/code/sys_math3d_draw.c b/src/code/sys_math3d_draw.c index 5fc9ac7b3..bb37ba176 100644 --- a/src/code/sys_math3d_draw.c +++ b/src/code/sys_math3d_draw.c @@ -2,6 +2,8 @@ #include "z64play.h" #include "gfx.h" #include "sys_matrix.h" +#include "libc64/math64.h" +#include "z_lib.h" #if DEBUG_FEATURES void Math3D_VtxF2L(Vtx* r, Vec3f* v) { diff --git a/src/code/sys_ucode.c b/src/code/sys_ucode.c index 3e2291393..f7ce8a183 100644 --- a/src/code/sys_ucode.c +++ b/src/code/sys_ucode.c @@ -1,6 +1,9 @@ #include "fault.h" #include "ultra64.h" #include "segment_symbols.h" +#include "occlusionplanes.h" +#include "z64dma.h" +#include "macros.h" #if !ENABLE_F3DEX3 u64* sDefaultGSPUCodeText = gspF3DZEX2_NoN_PosLight_fifoTextStart; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index fed73e75e..d145cf02d 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -22,6 +22,7 @@ #include "z64save.h" #include "z64skin_matrix.h" #include "config.h" +#include "widescreen.h" #include "global.h" diff --git a/src/code/z_fbdemo_circle.c b/src/code/z_fbdemo_circle.c index decaa4861..20532a5e0 100644 --- a/src/code/z_fbdemo_circle.c +++ b/src/code/z_fbdemo_circle.c @@ -1,4 +1,5 @@ #include "global.h" +#include "widescreen.h" typedef enum TransitionCircleDirection { /* 0 */ TRANS_CIRCLE_DIR_IN, diff --git a/src/code/z_fbdemo_wipe1.c b/src/code/z_fbdemo_wipe1.c index b8ee9883f..8bbecff2d 100644 --- a/src/code/z_fbdemo_wipe1.c +++ b/src/code/z_fbdemo_wipe1.c @@ -1,6 +1,7 @@ #include "gfx.h" #include "z64save.h" #include "z64transition_instances.h" +#include "widescreen.h" typedef enum TransitionWipeDirection { /* 0 */ TRANS_WIPE_DIR_IN, diff --git a/src/code/z_game_dlftbls.c b/src/code/z_game_dlftbls.c index 95969c291..d5094447f 100644 --- a/src/code/z_game_dlftbls.c +++ b/src/code/z_game_dlftbls.c @@ -4,6 +4,7 @@ #include "z64play.h" #include "title_setup_state.h" #include "file_select_state.h" +#include "debug_opening_state.h" #include "global.h" diff --git a/src/code/z_kanfont.c b/src/code/z_kanfont.c index 21ba416b3..786c470f5 100644 --- a/src/code/z_kanfont.c +++ b/src/code/z_kanfont.c @@ -5,6 +5,7 @@ #include "z64dma.h" #include "z64font.h" #include "z64message.h" +#include "widescreen.h" #include "macros.h" diff --git a/src/code/z_lifemeter.c b/src/code/z_lifemeter.c index 970e18982..4a163a7a3 100644 --- a/src/code/z_lifemeter.c +++ b/src/code/z_lifemeter.c @@ -7,6 +7,7 @@ #include "z64play.h" #include "z64player.h" #include "z64save.h" +#include "widescreen.h" #include "assets/textures/parameter_static/parameter_static.h" diff --git a/src/code/z_map_exp.c b/src/code/z_map_exp.c index 59040a521..348850eba 100644 --- a/src/code/z_map_exp.c +++ b/src/code/z_map_exp.c @@ -12,6 +12,7 @@ #include "z64play.h" #include "z64player.h" #include "z64save.h" +#include "widescreen.h" #include "global.h" diff --git a/src/code/z_map_mark.c b/src/code/z_map_mark.c index 7c9cc6164..292a5e891 100644 --- a/src/code/z_map_mark.c +++ b/src/code/z_map_mark.c @@ -11,6 +11,7 @@ #include "z64map_mark.h" #include "z64play.h" #include "z64save.h" +#include "widescreen.h" #include "global.h" diff --git a/src/code/z_message.c b/src/code/z_message.c index e0355409f..768d885fd 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -18,6 +18,7 @@ #include "z64play.h" #include "z64player.h" #include "z64save.h" +#include "widescreen.h" #include "global.h" diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 5054790d8..f6cedb721 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -19,6 +19,7 @@ #include "z64play.h" #include "z64player.h" #include "z64save.h" +#include "widescreen.h" #include "global.h" diff --git a/src/code/z_view.c b/src/code/z_view.c index f2982c290..15f67be5e 100644 --- a/src/code/z_view.c +++ b/src/code/z_view.c @@ -1,5 +1,6 @@ #include "global.h" #include "terminal.h" +#include "widescreen.h" vu32 sLogOnNextViewInit = true; diff --git a/src/debug/profiler.c b/src/debug/profiler.c index 425ecbb8a..24d5c90af 100644 --- a/src/debug/profiler.c +++ b/src/debug/profiler.c @@ -1,5 +1,6 @@ #include "global.h" #include "z64.h" +#include "z64thread.h" #if ENABLE_PROFILER diff --git a/src/libu64/gfxprint.c b/src/libu64/gfxprint.c index 1e0abf02c..c3d67c19c 100644 --- a/src/libu64/gfxprint.c +++ b/src/libu64/gfxprint.c @@ -1,4 +1,5 @@ #include "global.h" +#include "widescreen.h" u16 sGfxPrintFontTLUT[64] = { 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, diff --git a/src/libultra/io/pimgr.c b/src/libultra/io/pimgr.c index db2685a62..873e6eda4 100644 --- a/src/libultra/io/pimgr.c +++ b/src/libultra/io/pimgr.c @@ -1,6 +1,7 @@ #include "global.h" #include "stack.h" #include "ultra64/internal.h" +#include "z64thread.h" OSDevMgr __osPiDevMgr = { 0 }; diff --git a/src/libultra/io/vimgr.c b/src/libultra/io/vimgr.c index 6a2fad964..f3505b05d 100644 --- a/src/libultra/io/vimgr.c +++ b/src/libultra/io/vimgr.c @@ -1,6 +1,7 @@ #include "global.h" #include "stack.h" #include "ultra64/internal.h" +#include "z64thread.h" static OSThread viThread; static STACK(viThreadStack, 0x1000); diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index ac6e9311b..2d944c895 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -21,6 +21,7 @@ #include "z64play.h" #include "z64save.h" #include "z64ss_sram.h" +#include "widescreen.h" #include "assets/objects/object_mag/object_mag.h" diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index 7cca73d85..ab4d2bdb4 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -12,6 +12,7 @@ #include "versions.h" #include "z64play.h" #include "z64player.h" +#include "widescreen.h" #define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_DRAW_CULLING_DISABLED) diff --git a/src/overlays/gamestates/ovl_debug_opening/debug_opening.c b/src/overlays/gamestates/ovl_debug_opening/debug_opening.c index 22f2a36f1..fa62d7b3e 100644 --- a/src/overlays/gamestates/ovl_debug_opening/debug_opening.c +++ b/src/overlays/gamestates/ovl_debug_opening/debug_opening.c @@ -11,9 +11,10 @@ #if IS_DEBUG_BOOT_ENABLED #include "alloca.h" -#include "debug_opening.h" +#include "debug_opening_state.h" #include "macros.h" #include "helpers.h" +#include "seqcmd.h" #define DEBUG_OPENING_SKYBOX_ID SKYBOX_NORMAL_SKY static f32 sSkyboxAngle = 0.0f; diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 12ace92ce..857c88be6 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -24,6 +24,7 @@ #include "z64sram.h" #include "z64ss_sram.h" #include "z64view.h" +#include "widescreen.h" #include "global.h" diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index de6ffbc83..e520c5313 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -6,6 +6,9 @@ #include "ultra64.h" #include "alloca.h" #include "z_select.h" +#include "debug_opening_state.h" +#include "console_logo_state.h" +#include "seqcmd.h" void MapSelect_Init(GameState* thisx) { MapSelectState* this = (MapSelectState*)thisx; @@ -173,9 +176,9 @@ void MapSelect_UpdateMenu(MapSelectState* this) { if (this->verticalInputAccumulator == 0) { // load the scene if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) { - selectedEntry = &this->entries[this->currentEntry]; - if (selectedEntry->loadFunc != NULL) { - selectedEntry->loadFunc(this, selectedEntry->entranceIndex); + selectedScene = &this->scenes[this->currentScene]; + if (selectedScene->loadFunc != NULL) { + selectedScene->loadFunc(this, selectedScene->entranceIndex); } } @@ -273,7 +276,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) { this->pageDownIndex++; this->pageDownIndex = (this->pageDownIndex + ARRAY_COUNT(this->pageDownStops)) % ARRAY_COUNT(this->pageDownStops); - this->currentEntry = this->topDisplayedEntry = this->pageDownStops[this->pageDownIndex]; + this->currentScene = this->topDisplayedScene = this->pageDownStops[this->pageDownIndex]; } this->verticalInputAccumulator += this->verticalInput; @@ -312,8 +315,8 @@ void MapSelect_UpdateMenu(MapSelectState* this) { this->currentScene = (this->currentScene + this->sceneTotal) % this->sceneTotal; this->topDisplayedScene = (this->topDisplayedScene + this->sceneTotal) % this->sceneTotal; - dREG(80) = this->currentEntry; - dREG(81) = this->topDisplayedEntry; + dREG(80) = this->currentScene; + dREG(81) = this->topDisplayedScene; dREG(82) = this->pageDownIndex; if (this->timerUp != 0) { diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index c598b5d29..eefcc84c5 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -17,6 +17,8 @@ #include "n64dd.h" #endif #include "z64save.h" +#include "widescreen.h" +#include "debug_opening_state.h" #include "assets/textures/nintendo_rogo_static/nintendo_rogo_static.h" diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index 35a21a31e..aed6fd0da 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -1,6 +1,7 @@ #include "z_kaleido_scope.h" #include "z64save.h" +#include "widescreen.h" #include "assets/textures/parameter_static/parameter_static.h" diff --git a/tools/Flips/Makefile b/tools/Flips/Makefile index b82aefbd9..a63df579e 100644 --- a/tools/Flips/Makefile +++ b/tools/Flips/Makefile @@ -77,7 +77,7 @@ all: $(FNAME_$(TARGET)) obj: $(V)mkdir obj clean: | obj - $(V)rm obj/* || true + $(V)rm -r -f obj/* || true ifeq ($(TARGET),windows) XFILES += obj/rc.o diff --git a/tools/Makefile b/tools/Makefile index 7db062979..dc61c6e6b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,7 @@ MAKEFLAGS += --no-builtin-rules --no-print-directory CFLAGS := -Wall -Wextra -pedantic -std=gnu99 -g -O2 -PROGRAMS := bin2c elf2rom makeromfs mkdmadata mkldscript preprocess_pragmas reloc_prereq vtxdis +PROGRAMS := bin2c elf2rom makeromfs mkdmadata mkldscript preprocess_pragmas reloc_prereq UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) @@ -69,7 +69,7 @@ ifneq ($(wildcard ./gzinject/Makefile),) endif $(V)$(MAKE) -C z64compress clean $(V)$(MAKE) -C Flips clean - $(V)rm Flips/flips + $(V)rm -f Flips/flips $(V)$(MAKE) -C audio clean $(V)$(MAKE) -C com-plugin clean $(V)$(MAKE) -C assets clean diff --git a/tools/assets/Makefile b/tools/assets/Makefile index d445d3879..eba1b2550 100644 --- a/tools/assets/Makefile +++ b/tools/assets/Makefile @@ -1,10 +1,12 @@ +-include ../print_rules.mk + all: - $(MAKE) -C n64texconv + $(V)$(MAKE) -C n64texconv clean: - $(MAKE) -C n64texconv clean + $(V)$(MAKE) -C n64texconv clean distclean: clean - $(MAKE) -C n64texconv distclean + $(V)$(MAKE) -C n64texconv distclean .PHONY: all clean distclean diff --git a/tools/assets/n64texconv/Makefile b/tools/assets/n64texconv/Makefile index fbe0300d7..c83b9f713 100644 --- a/tools/assets/n64texconv/Makefile +++ b/tools/assets/n64texconv/Makefile @@ -50,28 +50,33 @@ $(shell mkdir -p $(BUILD_DIR) $(foreach dir,$(SRC_DIRS) $(LIB_DIRS) $(APP_SRC_DI $(BUILD_DIR)/lib/libimagequant/%.o: CFLAGS += $(OMPFLAGS) -Wno-sign-compare -Wno-unused-parameter -Wno-shadow +-include ../../print_rules.mk + .PHONY: all clean distclean format all: $(LIB) $(SOLIB) $(APP) clean: - $(RM) -r $(LIB) $(SOLIB) $(APP) $(BUILD_DIR) + $(V)$(RM) -r $(LIB) $(SOLIB) $(APP) $(BUILD_DIR) distclean: clean format: - $(CLANG_FORMAT) $(FORMAT_ARGS) $(FMT_FILES) + $(V)$(CLANG_FORMAT) $(FORMAT_ARGS) $(FMT_FILES) $(LIB): $(O_FILES) - $(AR) $(ARFLAGS) $@ $^ + $(V)$(AR) $(ARFLAGS) $@ $^ $(SOLIB): $(O_FILES) - $(CC) -shared $^ $(LDLIBS) -o $@ + $(call print_two_args,Linking:,$<,$@) + $(V)$(CC) -shared $^ $(LDLIBS) -o $@ $(APP): $(APP_O_FILES) $(LIB) - $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ + $(call print_two_args,Linking:,$<,$@) + $(V)$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(BUILD_DIR)/%.o: %.c - $(CC) $(CFLAGS) $(OPTFLAGS) -c $< -o $@ + $(call print_two_args,Compiling:,$<,$@) + $(V)$(CC) $(CFLAGS) $(OPTFLAGS) -c $< -o $@ -include $(DEP_FILES) $(APP_DEP_FILES)