--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@
 ifdef CARGO_BUILD_TARGET
 	BUILT_BIN = target/$(CARGO_BUILD_TARGET)/release/bcachefs
 else
-	BUILT_BIN = target/release/bcachefs
+	BUILT_BIN = target/$(RUST_TARGET)/release/bcachefs
 endif
 
 # Prevent recursive expansions of $(CFLAGS) to avoid repeatedly performing
@@ -67,7 +67,7 @@
 CARGO_PROFILE=release
 # CARGO_PROFILE=debug
 
-CARGO_BUILD_ARGS=--$(CARGO_PROFILE)
+CARGO_BUILD_ARGS=--$(CARGO_PROFILE) --target $(RUST_TARGET)
 CARGO_BUILD=$(CARGO) build $(CARGO_BUILD_ARGS)
 
 CARGO_CLEAN=$(CARGO) clean $(CARGO_CLEAN_ARGS)
@@ -82,7 +82,6 @@
 CFLAGS+=$(call cc-disable-warning, shift-overflow)
 CFLAGS+=$(call cc-disable-warning, enum-conversion)
 CFLAGS+=$(call cc-disable-warning, gnu-variable-sized-type-not-at-end)
-export RUSTFLAGS:=$(RUSTFLAGS) -C default-linker-libraries
 
 PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd libudev libkeyutils"
 ifdef BCACHEFS_FUSE
@@ -174,7 +173,7 @@
 .PHONY: install
 install: INITRAMFS_HOOK=$(INITRAMFS_DIR)/hooks/bcachefs
 install: INITRAMFS_SCRIPT=$(INITRAMFS_DIR)/scripts/local-premount/bcachefs
-install: all install_dkms
+install: install_dkms
 	$(INSTALL) -m0755 -D $(BUILT_BIN)  -t $(DESTDIR)$(ROOT_SBINDIR)
 	$(INSTALL) -m0644 -D bcachefs.8    -t $(DESTDIR)$(PREFIX)/share/man/man8/
 	$(INSTALL) -m0755 -D initramfs/script $(DESTDIR)$(INITRAMFS_SCRIPT)
