- Build in build/ directory instead of source tree - Main binary (utun) copied to project root - Tests run from build/tests/ with config files copied there - Test output redirected to build/tests/logs/*.log files - Console shows only [PASS]/[FAIL]/[SKIP] status - Incremental build works correctly - make check runs all tests with summary Changes: - New root Makefile as wrapper for out-of-tree build - Updated Makefile.am files for lib, src, tests - Added tinycrypt-objects target for test dependencies - Tests no longer clutter project root
27 lines
779 B
Makefile
27 lines
779 B
Makefile
# 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)
|
|
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-local:
|
|
-rm -rf $(BUILD_DIR)
|