Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i686-elf-gcc -T linker.ld -o bin/kernel.bin -ffreestanding -O2 -nostdlib
- src/boot.o src/gdt.o src/cgdt.o src/kernel.o -lgcc
- src/cgdt.o: In function `gdt_set_gate':
- cgdt.c:(.text+0x0): multiple definition of `gdt_set_gate'
- src/gdt.o:gdt.c:(.text+0x0): first defined here
- src/cgdt.o: In function `gdt_install':
- cgdt.c:(.text+0x70): multiple definition of `gdt_install'
- src/gdt.o:gdt.c:(.text+0x70): first defined here
- src/gdt.o: In function `gdt_install':
- gdt.c:(.text+0x17a): undefined reference to `gdt_flush'
- src/cgdt.o: In function `gdt_install':
- cgdt.c:(.text+0x17a): undefined reference to `gdt_flush'
- collect2: error: ld returned 1 exit status
- Makefile:17: recipe for target 'link' failed
- make: *** [link] Error 1
- CC=i686-elf-gcc
- AS=i686-elf-as
- LINKER=i686-elf-gcc
- CFLAGS=-std=gnu99 -ffreestanding -O2 -Wall -Wextra -I./src/include
- LDFLAGS=-T linker.ld
- C_SOURCES = $(shell ls src/*.c)
- ASM_SOURCES = $(shell ls src/*.s)
- OBJECTS = $(ASM_SOURCES:.s=.o) $(C_SOURCES:.c=.o)
- all: $(OBJECTS) link
- clean:
- -rm ./src/*.o
- link:
- $(LINKER) $(LDFLAGS) -o bin/kernel.bin -ffreestanding -O2 -nostdlib $(OBJECTS) -lgcc
- .c.o:
- $(CC) $(CFLAGS) -c $< -o $@
- .s.o:
- $(AS) $< -o $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement