diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -18,14 +18,16 @@ USB_STICK=/dev/sdd #take care! #here our kernel will be loaded by the bootloader. KERNEL_START=0x18000 +#use our cross compiler +CC=i686-elf-gcc + ############ flags ############ -CFLAGS=-ffreestanding -std=gnu11 -m32 -fno-asynchronous-unwind-tables -O0 +CFLAGS=-ffreestanding -nostdlib -lgcc -std=gnu11 CFLAGS+= -I. #CFLAGS+=-fdata-sections -ffunction-sections #CFLAGS+= -Werror - ############ source and object files ############ #kernel sources (asm and c) @@ -78,7 +80,8 @@ newrun: clean run # the kernel_entry.o needs to be FIRST!! kernel.bin: $(KERNEL_ENTRY) $(ASMOBJECTS) $(OBJECTS) - ld -o $@ -Ttext $(KERNEL_START) --oformat binary -melf_i386 $^ -O0 # --gc-sections --entry=kernel_main -v + $(CC) $(CFLAGS) -o $@ -Wl,-Ttext,$(KERNEL_START),--oformat,binary $^ + #ld -o $@ -Ttext $(KERNEL_START) --oformat binary -melf_i386 $^ -O0 # --gc-sections --entry=kernel_main -v ############ fool-font ############ |
