From b4624a92237c5f6e6c6aa8d9b2ffeb382c130d12 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Thu, 23 Oct 2025 18:32:17 +0200 Subject: [PATCH] arreglos en makefiles i cmakes --- .gitignore | 4 ++- Makefile | 82 ++++++++++++++++++++++++++------------------------ tools/Makefile | 2 +- 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/.gitignore b/.gitignore index 5b5594a..ed7be47 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,6 @@ debug.txt cppcheck-result* desktop.ini ccae_release/ -resources.pack \ No newline at end of file +resources.pack +tools/pack_resources.cpp +pack_resources.cpp diff --git a/Makefile b/Makefile index 1ec05ff..85433b9 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ else PACK_CXX := $(CXX) endif PACK_SOURCES := $(DIR_TOOLS)pack_resources.cpp $(DIR_SOURCES)resource_pack.cpp -PACK_INCLUDES := -I$(DIR_ROOT) +PACK_INCLUDES := -I$(DIR_ROOT) -I$(DIR_BUILD) # Versión automática basada en la fecha actual (específica por SO) ifeq ($(OS),Windows_NT) @@ -49,45 +49,41 @@ RASPI_RELEASE := $(TARGET_FILE)-$(VERSION)-raspberry.tar.gz # Lista completa de archivos fuente (basada en CMakeLists.txt) APP_SOURCES := \ - source/animated_sprite.cpp \ source/asset.cpp \ source/audio.cpp \ - source/background.cpp \ - source/balloon_formations.cpp \ - source/balloon_manager.cpp \ - source/balloon.cpp \ - source/bullet.cpp \ - source/color.cpp \ - source/define_buttons.cpp \ - source/difficulty.cpp \ source/director.cpp \ - source/enter_name.cpp \ - source/explosions.cpp \ - source/external/gif.cpp \ - source/external/jail_audio.cpp \ - source/external/jail_shader.cpp \ - source/fade.cpp \ - source/game_logo.cpp \ source/global_events.cpp \ source/global_inputs.cpp \ - source/input_types.cpp \ source/input.cpp \ - source/item.cpp \ source/lang.cpp \ source/main.cpp \ - source/manage_hiscore_table.cpp \ - source/mouse.cpp \ - source/moving_sprite.cpp \ - source/options.cpp \ source/param.cpp \ - source/path_sprite.cpp \ - source/player.cpp \ source/resource.cpp \ source/resource_helper.cpp \ source/resource_loader.cpp \ source/resource_pack.cpp \ - source/scoreboard.cpp \ source/screen.cpp \ + source/text.cpp \ + source/writer.cpp \ + source/ui/menu_option.cpp \ + source/ui/menu_renderer.cpp \ + source/ui/notifier.cpp \ + source/ui/service_menu.cpp \ + source/ui/ui_message.cpp \ + source/ui/window_message.cpp \ + source/balloon_formations.cpp \ + source/balloon_manager.cpp \ + source/balloon.cpp \ + source/bullet.cpp \ + source/bullet_manager.cpp \ + source/enter_name.cpp \ + source/explosions.cpp \ + source/game_logo.cpp \ + source/item.cpp \ + source/manage_hiscore_table.cpp \ + source/player.cpp \ + source/scoreboard.cpp \ + source/tabe.cpp \ source/sections/credits.cpp \ source/sections/game.cpp \ source/sections/hiscore_table.cpp \ @@ -95,26 +91,32 @@ APP_SOURCES := \ source/sections/intro.cpp \ source/sections/logo.cpp \ source/sections/title.cpp \ - source/shutdown.cpp \ + source/animated_sprite.cpp \ + source/background.cpp \ + source/fade.cpp \ + source/moving_sprite.cpp \ + source/path_sprite.cpp \ source/smart_sprite.cpp \ source/sprite.cpp \ - source/stage.cpp \ - source/system_utils.cpp \ - source/tabe.cpp \ - source/text.cpp \ source/texture.cpp \ source/tiled_bg.cpp \ - source/ui/menu_option.cpp \ - source/ui/menu_renderer.cpp \ - source/ui/notifier.cpp \ - source/ui/service_menu.cpp \ - source/ui/ui_message.cpp \ - source/ui/window_message.cpp \ + source/color.cpp \ + source/demo.cpp \ + source/define_buttons.cpp \ + source/difficulty.cpp \ + source/input_types.cpp \ + source/mouse.cpp \ + source/options.cpp \ + source/shutdown.cpp \ + source/stage.cpp \ + source/system_utils.cpp \ source/utils.cpp \ - source/writer.cpp + source/external/jail_audio.cpp \ + source/external/gif.cpp \ + source/rendering/opengl/opengl_shader.cpp # Includes -INCLUDES := -Isource -Isource/external +INCLUDES := -Isource -Isource/external -Isource/rendering -I$(DIR_BUILD) # Variables según el sistema operativo ifeq ($(OS),Windows_NT) @@ -150,7 +152,7 @@ endif # Reglas para herramienta de empaquetado y resources.pack $(PACK_TOOL): $(PACK_SOURCES) @echo "Compilando herramienta de empaquetado..." - $(PACK_CXX) -std=c++17 -Wall -Os $(PACK_INCLUDES) $(PACK_SOURCES) -o $(PACK_TOOL) + $(PACK_CXX) -std=c++20 -Wall -Os $(PACK_INCLUDES) $(PACK_SOURCES) -o $(PACK_TOOL) @echo "✓ Herramienta de empaquetado lista: $(PACK_TOOL)" pack_tool: $(PACK_TOOL) diff --git a/tools/Makefile b/tools/Makefile index 135ac29..e6c0d84 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,7 +3,7 @@ # Variables CXX := g++ -CXXFLAGS := -std=c++17 -Wall -Os -I../ +CXXFLAGS := -std=c++20 -Wall -Os -I../ SOURCES := pack_resources.cpp ../source/resource_pack.cpp TARGET := pack_resources CLEAN_FILES := pack_resources *.pack *.o