mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Specify rust target
This commit is contained in:
5
Makefile
5
Makefile
@@ -13,10 +13,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
arch ?= x86_64
|
||||
target ?= $(arch)-unknown-linux-gnu
|
||||
kernel := build/kernel-$(arch).bin
|
||||
iso := build/os-$(arch).iso
|
||||
|
||||
rust_os := target/debug/libblog_os.a
|
||||
rust_os := target/$(target)/debug/libblog_os.a
|
||||
linker_script := src/arch/$(arch)/linker.ld
|
||||
grub_cfg := src/arch/$(arch)/grub.cfg
|
||||
assembly_source_files := $(wildcard src/arch/$(arch)/*.asm)
|
||||
@@ -47,7 +48,7 @@ $(kernel): cargo $(rust_os) $(assembly_object_files) $(linker_script)
|
||||
@ld -n --gc-sections -T $(linker_script) -o $(kernel) $(assembly_object_files) $(rust_os)
|
||||
|
||||
cargo:
|
||||
@cargo rustc -- -Z no-landing-pads
|
||||
@cargo rustc --target $(target) -- -Z no-landing-pads
|
||||
|
||||
# compile assembly files
|
||||
build/arch/$(arch)/%.o: src/arch/$(arch)/%.asm
|
||||
|
||||
Reference in New Issue
Block a user