v0.1.18 - Add automatic cleanup of dynamic build artifacts after static builds

This commit is contained in:
Your Name
2025-12-13 07:54:20 -04:00
parent 64b9f28444
commit a5f92e4da3
18 changed files with 2239 additions and 18 deletions

View File

@@ -43,10 +43,18 @@ $(POOL_OBJ): $(POOL_SRC) | $(BUILDDIR)
$(TARGET): $(OBJECTS) $(POOL_OBJ)
$(CC) $(OBJECTS) $(POOL_OBJ) $(LIBS) -o $@
# Clean build files
# Clean build files (preserves static binaries)
clean:
rm -rf $(BUILDDIR)
rm -f $(EMBEDDED_HEADER)
@echo "Note: Static binaries (ginxsom-fcgi_static_*) are preserved."
@echo "To remove everything: make clean-all"
# Clean everything including static binaries
clean-all:
rm -rf $(BUILDDIR)
rm -f $(EMBEDDED_HEADER)
@echo "✓ All build artifacts removed"
# Install (copy to system location)
install: $(TARGET)
@@ -69,4 +77,12 @@ debug: $(TARGET)
embed:
@$(EMBED_SCRIPT)
.PHONY: all clean install uninstall run debug embed
# Static MUSL build via Docker
static:
./build_static.sh
# Static MUSL build with debug symbols
static-debug:
./build_static.sh --debug
.PHONY: all clean clean-all install uninstall run debug embed static static-debug