diff options
| author | Tianhao Wang <shrik3@mailbox.org> | 2024-04-16 18:23:45 +0200 |
|---|---|---|
| committer | Tianhao Wang <shrik3@mailbox.org> | 2024-06-11 15:13:40 +0200 |
| commit | f72b2b11b8603f8afdd0a2d0d16d51c64747c4ea (patch) | |
| tree | e0309a11258e0809794be679a1fe432a9ef37ce0 /Makefile | |
| parent | 425e3fd1fd97e50041d8272bf4bcc7c1107571a1 (diff) | |
re-organize code
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -18,7 +18,8 @@ BUILD = build ARCH = x86_64 ASM = nasm ASMOBJFORMAT = elf64 -LINKER_SCRIPT = ./src/arch/$(ARCH)/linker.ld +LINKER_SCRIPT = ./compiler/$(ARCH)-linker.ld +CARGO_XBUILD_TARGET = ./compiler/$(ARCH)-rustubs.json CARGO_XBUILD_FLAGS = # ---------- No need to edit below this line -------------- # ---------- If you have to, something is wrong ----------- @@ -61,13 +62,13 @@ $(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 $(ARCH)-rustubs.json $(CARGO_XBUILD_FLAG) + cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAG) # need nasm # TODO make this arch dependent -startup.o: startup.s | $(BUILD) +startup.o: boot/startup-$(ARCH).s | $(BUILD) @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi - nasm -f elf64 -o $(BUILD)/startup.o startup.s + nasm -f elf64 -o $(BUILD)/startup.o boot/startup-$(ARCH).s .PHONY: $(BUILD) $(BUILD): |
