Use HOST_CARGO variable for compiling binaries on the host
This commit is contained in:
parent
26bf3005f8
commit
85d75b7681
|
@ -13,6 +13,7 @@ FILESYSTEM_SIZE?=256
|
||||||
REDOXFS_MKFS_FLAGS?=
|
REDOXFS_MKFS_FLAGS?=
|
||||||
|
|
||||||
# Per host variables
|
# Per host variables
|
||||||
|
HOST_CARGO=env --unset=RUSTUP_TOOLCHAIN cargo
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
FUMOUNT=sudo umount
|
FUMOUNT=sudo umount
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
build/filesystem.bin: prefix filesystem.toml build/bootloader.bin build/initfs.img
|
build/filesystem.bin: prefix filesystem.toml build/bootloader.bin build/initfs.img
|
||||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
|
||||||
cargo build --manifest-path installer/Cargo.toml --release
|
$(HOST_CARGO) build --manifest-path installer/Cargo.toml --release
|
||||||
cargo build --manifest-path redoxfs/Cargo.toml --release
|
$(HOST_CARGO) build --manifest-path redoxfs/Cargo.toml --release
|
||||||
-$(FUMOUNT) build/filesystem/ || true
|
-$(FUMOUNT) build/filesystem/ || true
|
||||||
rm -rf $@ $@.partial build/filesystem/
|
rm -rf $@ $@.partial build/filesystem/
|
||||||
fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial
|
fallocate --posix --length "$(FILESYSTEM_SIZE)MiB" $@.partial
|
||||||
cargo run --release \
|
$(HOST_CARGO) run --release \
|
||||||
--manifest-path redoxfs/Cargo.toml \
|
--manifest-path redoxfs/Cargo.toml \
|
||||||
--bin redoxfs-mkfs \
|
--bin redoxfs-mkfs \
|
||||||
-- $(REDOXFS_MKFS_FLAGS) $@.partial
|
-- $(REDOXFS_MKFS_FLAGS) $@.partial
|
||||||
|
@ -28,14 +28,14 @@ build/filesystem.bin: prefix filesystem.toml build/bootloader.bin build/initfs.i
|
||||||
|
|
||||||
mount: FORCE
|
mount: FORCE
|
||||||
mkdir -p build/filesystem/
|
mkdir -p build/filesystem/
|
||||||
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
|
$(HOST_CARGO) build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
|
||||||
redoxfs/target/release/redoxfs build/harddrive.bin build/filesystem/
|
redoxfs/target/release/redoxfs build/harddrive.bin build/filesystem/
|
||||||
sleep 2
|
sleep 2
|
||||||
pgrep redoxfs
|
pgrep redoxfs
|
||||||
|
|
||||||
mount_extra: FORCE
|
mount_extra: FORCE
|
||||||
mkdir -p build/filesystem/
|
mkdir -p build/filesystem/
|
||||||
cargo build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
|
$(HOST_CARGO) build --manifest-path redoxfs/Cargo.toml --release --bin redoxfs
|
||||||
redoxfs/target/release/redoxfs build/extra.bin build/filesystem/
|
redoxfs/target/release/redoxfs build/extra.bin build/filesystem/
|
||||||
sleep 2
|
sleep 2
|
||||||
pgrep redoxfs
|
pgrep redoxfs
|
||||||
|
|
|
@ -3,8 +3,8 @@ INITFS_RM_BINS=\
|
||||||
redoxfs-mkfs
|
redoxfs-mkfs
|
||||||
|
|
||||||
build/initfs.img: initfs.toml prefix
|
build/initfs.img: initfs.toml prefix
|
||||||
cargo build --manifest-path cookbook/Cargo.toml --release
|
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
|
||||||
cargo build --manifest-path installer/Cargo.toml --release
|
$(HOST_CARGO) build --manifest-path installer/Cargo.toml --release
|
||||||
rm -rf build/initfs
|
rm -rf build/initfs
|
||||||
mkdir -p build/initfs
|
mkdir -p build/initfs
|
||||||
$(INSTALLER) -c $< build/initfs/
|
$(INSTALLER) -c $< build/initfs/
|
||||||
|
|
Loading…
Reference in a new issue