SHELL = /bin/sh
CC = gcc
-CPP = $(CC) -E
VPATH := $(TOP_SRCDIR)/threads
VPATH := $(VPATH):$(TOP_SRCDIR)/devices
VPATH := $(VPATH):$(TOP_SRCDIR)/userprog
WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS = -g -O3 -MMD $(WARNINGS) $(INCLUDES) $(DEFINES)
+CFLAGS = -g -O3 -MMD -msoft-float $(WARNINGS) $(INCLUDES) $(DEFINES)
ASFLAGS = -Wa,--gstabs+ $(INCLUDES) $(DEFINES)
# Core kernel.
intr-stubs.S: $(TOP_SRCDIR)/threads/intr-stubs.pl
$< > $@
-kernel.lds: $(TOP_SRCDIR)/threads/kernel.lds.in $(TOP_SRCDIR)/threads/loader.h
+kernel.lds.s: $(TOP_SRCDIR)/threads/kernel.lds.S $(TOP_SRCDIR)/threads/loader.h
$(CPP) -x assembler-with-cpp -P $< -o $@
-kernel.o: $(OBJECTS) kernel.lds
- ld -T kernel.lds -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name`
+kernel.o: $(OBJECTS) kernel.lds.s
+ ld -T kernel.lds.s -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name`
kernel.bin: kernel.o
objcopy -O binary -R .note -R .comment -S $< $@.tmp
clean:
rm -f *.o *.d *.bin
- rm -f kernel.bin.data kernel.bin.pad intr-stubs.S kernel.lds
+ rm -f kernel.bin.data kernel.bin.pad intr-stubs.S kernel.lds.s
-include *.d
--- /dev/null
+#include "loader.h"
+
+OUTPUT_FORMAT("elf32-i386")
+OUTPUT_ARCH("i386")
+ENTRY(start)
+SECTIONS
+{
+ . = LOADER_PHYS_BASE + LOADER_KERN_BASE;
+
+ _start = .;
+
+ .text : { *(.text) } = 0x9090
+ .rodata : { *(.rodata) *(.rodata.*) }
+ .data : { *(.data) }
+
+ _start_bss = .;
+ .bss : { *(.bss) }
+ _end_bss = .;
+
+ _end = .;
+}
+++ /dev/null
-#include "loader.h"
-
-OUTPUT_FORMAT("elf32-i386")
-OUTPUT_ARCH("i386")
-ENTRY(start)
-SECTIONS
-{
- . = LOADER_PHYS_BASE + LOADER_KERN_BASE;
-
- _start = .;
-
- .text : { *(.text) } = 0x9090
-
- .rodata : { *(.rodata) *(.rodata.*) }
-
- .data : { *(.data) }
-
- _start_bss = .;
- .bss : { *(.bss) }
- _end_bss = .;
-
- _end = .;
-}