[build] Bug Fix: Don't Override Cargo Flags
@@ -21,8 +21,6 @@ export BUILDDIR = $(CURDIR)/build
export DRIVER ?= $(shell [ ! -z "`lspci | grep -E "ConnectX-[4,5]"`" ] && echo mlx5 || echo mlx4)
export BUILD ?= --release
-export CARGO_FLAGS ?= $(BUILD) --features=$(DRIVER)
-
#===============================================================================
all: demikernel-all demikernel-tests
@@ -31,11 +29,11 @@ clean: demikernel-clean
demikernel-all:
cd $(SRCDIR) && \
- $(CARGO) build --all $(CARGO_FLAGS)
+ $(CARGO) build --all $(BUILD) --features=$(DRIVER) $(CARGO_FLAGS)
demikernel-tests:
cd $(SRCDIR) && \
- $(CARGO) build --tests $(CARGO_FLAGS)
+ $(CARGO) build --tests $(BUILD) --features=$(DRIVER) $(CARGO_FLAGS)
demikernel-clean:
cd $(SRCDIR) && \
@@ -44,4 +42,4 @@ demikernel-clean:
test:
cd $(SRCDIR) && \
- sudo -E LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)" timeout $(TIMEOUT) $(CARGO) test $(CARGO_FLAGS) -- --nocapture $(TEST)
+ sudo -E LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)" timeout $(TIMEOUT) $(CARGO) test $(BUILD) --features=$(DRIVER) $(CARGO_FLAGS) -- --nocapture $(TEST)
