diff options
Diffstat (limited to 'sys/arch/amd64/Makefile')
| -rw-r--r-- | sys/arch/amd64/Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/amd64/Makefile b/sys/arch/amd64/Makefile index 3430e48..ba821ae 100644 --- a/sys/arch/amd64/Makefile +++ b/sys/arch/amd64/Makefile @@ -4,16 +4,17 @@ override PROMPT := printf "%s\t\t%s\n" CC = LD = SYS_CFLAGS = -ASMFILES = $(shell find . -name "*.S") +ASMFILES = $(shell find . -name "*.S" | grep -v "boot/") CFILES = $(shell find . -name "*.c") ASMOBJS = $(ASMFILES:.S=.S.o) COBJ = $(CFILES:.c=.o) DFILES = $(CFILES:.c=.d) -MISC_OFILES = $(shell find ../../ -name "*.o") +MISC_OFILES = $(shell find ../../ -name "*.o" | grep -v "boot/") .PHONY: all -all: $(ASMOBJS) $(COBJ) +all: boot $(ASMOBJS) $(COBJ) $(LD) -Tconf/link.ld $(MISC_OFILES) -o ../../rv7 + objcopy --update-section .trampoline=boot/apboot.bin ../../rv7 %.S.o: %.S $(PROMPT) " [AS] " $< @@ -24,6 +25,10 @@ all: $(ASMOBJS) $(COBJ) $(PROMPT) " [CC] " $< $(CC) -c -MMD -I../../target/inc/ -I../../inc/ $(SYS_CFLAGS) $< -o $@ +.PHONY: boot +boot: + nasm -fbin boot/apboot.asm -o boot/apboot.bin + .PHONY: clean clean: rm $(MISC_OFILES) |
