Browse Source
- Root Makefile: hand-written bootstrap delegating to build/ - Makefile.am: simplified to SUBDIRS + clean-local - build.sh: delegates to make, autoreconf only - tests: removed duplicate TESTS run, added colored [PASS]/[FAIL]/[SKIP] with timing - .gitignore: added /build/ for out-of-tree artifacts Result: 0 .o files in source dirs, 29/29 tests passcongestion
5 changed files with 50 additions and 52 deletions
@ -0,0 +1,28 @@ |
|||||||
|
# Bootstrap Makefile for utun
|
||||||
|
# All build artifacts (.o) go to build/ directory
|
||||||
|
# Final binary (utun) is copied to project root
|
||||||
|
|
||||||
|
BUILD_DIR = build
|
||||||
|
|
||||||
|
all: |
||||||
|
@mkdir -p $(BUILD_DIR)
|
||||||
|
@if test ! -f $(BUILD_DIR)/config.status || test ./configure -nt $(BUILD_DIR)/config.status; then \
|
||||||
|
echo "Configuring in $(BUILD_DIR)/..."; \
|
||||||
|
cd $(BUILD_DIR) && ../configure; \
|
||||||
|
fi
|
||||||
|
@$(MAKE) -C $(BUILD_DIR)
|
||||||
|
|
||||||
|
clean: |
||||||
|
-rm -rf $(BUILD_DIR)
|
||||||
|
|
||||||
|
distclean: clean |
||||||
|
-rm -f config.status config.log config.h stamp-h1
|
||||||
|
-rm -rf autom4te.cache/
|
||||||
|
|
||||||
|
check: all |
||||||
|
@$(MAKE) -C $(BUILD_DIR) check
|
||||||
|
|
||||||
|
install: |
||||||
|
@$(MAKE) -C $(BUILD_DIR) install
|
||||||
|
|
||||||
|
.PHONY: all clean distclean check install |
||||||
@ -1,26 +1,8 @@ |
|||||||
# Main Makefile.am for utun - root directory configuration
|
# Main Makefile.am for utun - root directory configuration
|
||||||
|
|
||||||
# This is the root Makefile.am - tests are defined in tests/Makefile.am
|
|
||||||
|
|
||||||
# Basic configuration for root directory
|
|
||||||
# Order matters: lib -> src -> tests (tests depend on src objects)
|
# Order matters: lib -> src -> tests (tests depend on src objects)
|
||||||
SUBDIRS = lib src tests
|
SUBDIRS = lib src tests
|
||||||
|
|
||||||
# Build directory for out-of-tree builds
|
|
||||||
BUILD_DIR = build
|
|
||||||
|
|
||||||
# Custom target to run full build in separate directory
|
|
||||||
.PHONY: fullbuild |
|
||||||
fullbuild: |
|
||||||
@echo "Building in $(BUILD_DIR)/ directory..."
|
|
||||||
@$(MKDIR_P) $(BUILD_DIR)
|
|
||||||
@if test ! -f $(BUILD_DIR)/Makefile; then \
|
|
||||||
echo "Running configure in $(BUILD_DIR)..."; \
|
|
||||||
cd $(BUILD_DIR) && $(top_srcdir)/configure; \
|
|
||||||
fi
|
|
||||||
@$(MAKE) -C $(BUILD_DIR) all
|
|
||||||
@echo "Build complete. Binaries copied to project root."
|
|
||||||
|
|
||||||
# Clean build directory
|
# Clean build directory
|
||||||
clean-local: |
clean-local: |
||||||
-rm -rf $(BUILD_DIR)
|
-rm -rf build/
|
||||||
|
|||||||
Loading…
Reference in new issue