diff --git a/Makefile b/Makefile index 4315e0c..c11c0a3 100644 --- a/Makefile +++ b/Makefile @@ -293,8 +293,14 @@ rebuild: clean all # Empaqueta data/ a $(BUILDDIR)/resources.pack (format AE26). Força un rebuild # del pack encara que res no hagi canviat dins data/. L'empaquetat també es fa # automàticament a cada `make`/`make debug` via el target CMake `resource_pack`. +# +# NO passem `-DCMAKE_BUILD_TYPE`: així respectem el tipus ja configurat al +# `CMakeCache.txt` (Debug si vens de `make debug`, Release si vens de +# `make release`). Si forcéssim Release ací, el següent build de debug +# invalidaria la cache i recompilaria-ho tot. El binari `pack_resources` +# és una utilitat petita on el build type és irrellevant. pack: - @cmake -S . -B $(BUILDDIR) $(CMAKE_GEN) -DCMAKE_BUILD_TYPE=Release $(CMAKE_DEFS) + @cmake -S . -B $(BUILDDIR) $(CMAKE_GEN) $(CMAKE_DEFS) @cmake --build $(BUILDDIR) --target pack_resources @./$(BUILDDIR)/pack_resources data $(BUILDDIR)/resources.pack