v0.1.18 - Add automatic cleanup of dynamic build artifacts after static builds
This commit is contained in:
20
Makefile
20
Makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user