Compare commits

..

1 commit

Author SHA1 Message Date
Vinzenz Schroeter c7d40b828b per-config build output using VPATH
All checks were successful
Rust / build-gnu-apt (pull_request) Successful in 5m13s
Rust / build-size-gnu-unstable (pull_request) Successful in 1m13s
based on https://make.mad-scientist.net/papers/multi-architecture-builds/
2025-05-28 15:07:04 +02:00
2 changed files with 16 additions and 14 deletions

View file

@ -24,7 +24,7 @@ ifeq (,$(filter _out_%,$(notdir $(CURDIR))))
else
#----- End Boilerplate
VPATH = $(SRCDIR)
VPATH = $(SRCDIR)
CARGO ?= cargo
STRIP ?= strip
@ -94,7 +94,6 @@ ifeq ($(LTO), 1)
CFLAGS += -flto
endif
# TODO: wildcard does not work with VPATH
_c_src := src/announce.c src/brightness_tester.c src/header_logger.c \
src/moving_line.c src/random_stuff.c src/wiping_clear.c
@ -121,16 +120,5 @@ build-rust: FORCE
FORCE: ;
help:
@echo "You have the choice of the following parameters:"
@echo ""
@echo "Variable | Description | Default | Values"
@echo "---------+-----------------------------------+-----------+---------------------------"
@echo "CARGO | which cargo binary to use | 'cargo' | 'rustup run nightly cargo'"
@echo "CC | which C compiler to use | 'gcc' | 'musl-gcc'"
@echo "STRIP | which strip command to use | 'strip' | -"
@echo "MUSL | if set, use musl instead of glibc | unset | '1'"
@echo "PROFILE | Compilation profile | 'release' | 'debug' or 'size-optimized'"
#----- Begin Boilerplate
endif

View file

@ -33,6 +33,20 @@ Makefile : ;
# and the source directory containing only source files, `clean' is as trivial
# as removing the target directories!
#
.PHONY: clean
.PHONY: clean clean-all
clean:
rm -rf $(OBJDIR)
clean-all:
rm -rf _out_*
help:
@echo "You have the choice of the following parameters:"
@echo ""
@echo "Variable | Description | Default | Values"
@echo "---------+----------------------+-----------+---------------------------"
@echo "LIBC | libc to link against | 'gnu' | 'gnu' or 'musl'"
@echo "PROFILE | Optimization profile | 'release' | 'debug' or 'size-optimized'"
@echo "LINK | | 'dynamic' | 'dynamic' or 'static'"
@echo "CARGO | cargo binary to use | 'cargo' | 'rustup run nightly cargo'"
@echo "CC | C compiler to use | 'gcc' | 'musl-gcc'"
@echo "STRIP | strip command to use | 'strip' | -"