aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-04-17 11:14:46 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:13:41 +0200
commitbb8ef9aca2bc862f697a9f4a83418103dd14136d (patch)
tree494276a729d6ccb4f44a49b8c662d4a400eab3b7 /Makefile
parent7f97da4d0877562aa4e46ae03d80dd489b8993c3 (diff)
makefile: fix cargo release build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0e3f565..292a1a5 100644
--- a/Makefile
+++ b/Makefile
@@ -31,10 +31,8 @@ ASMOBJ_PREFIXED = $(addprefix $(BUILD)/,$(ASM_OBJECTS))
VPATH = $(sort $(dir $(ASM_SOURCES)))
-
-# the logic here is so cursed
-ifeq (--release, $(findstring NT-5.1,$(CARGO_XBUILD_FLAGS)))
- RUST_BUILD = release
+ifneq ($(filter --release,$(CARGO_XBUILD_FLAGS)),)
+ RUST_BUILD = release
else
RUST_BUILD = debug
endif
@@ -62,7 +60,7 @@ $(BUILD)/_%.o : %.s | $(BUILD)
# Compile the rust part: note that the the cargo crate is of type [staticlib], if you don't
# define this, the linker will have troubles, especially when we use a "no_std" build
rust_kernel:
- cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAG)
+ cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAGS)
# need nasm
# TODO make this arch dependent