diff options
| author | Alexey Gavrilov <rebovas@yahoo.com> | 2023-08-20 20:13:59 +0700 |
|---|---|---|
| committer | Alexey Gavrilov <rebovas@yahoo.com> | 2023-08-20 20:13:59 +0700 |
| commit | 47844a0db257264e7f8c5c38e07745601c884a7e (patch) | |
| tree | 60642b3e3876c3d1e48bc19ee2026a5ec39e4e65 /makefile | |
| parent | b82ccebd3a0cce28177b5fac046139e2de7737fa (diff) | |
Edit README, Makefile, ld conf
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,10 +1,10 @@ -CC = gcc# compiler +CC = i686-elf-g++# compiler LD = ld# linker ASM = nasm# assembler -# what is the flag -O2 -CFLAGS = -c -Wall -ffreestanding -nostdinc -nostdlib -lgcc# c compiler flags +# test -O2 flag +CFLAGS = -c -m32 -Wall -ffreestanding -nostdinc -nostdlib -lgcc# c compiler flags # flag elf32 allow decrease object file size -AFLAGS = -f elf64# asm compiler flags +AFLAGS = -f elf32# asm compiler flags BDIR = build# build directory .PHONY: install @@ -18,9 +18,12 @@ build: mkdir $(BDIR) @echo "Compile source files..." $(CC) $(CFLAGS) -o ./$(BDIR)/kernel.o ./kernel/kernel.c + $(CC) $(CFLAGS) -o ./$(BDIR)/VGADisplay.o ./arch/x86/io/VGADisplay.cpp + $(CC) $(CFLAGS) -o ./$(BDIR)/TypeConverter.o ./arch/x86/inc/TypeConverter.cpp + $(CC) $(CFLAGS) -o ./$(BDIR)/GlobalObj.o ./arch/x86/io/GlobalObj.cpp $(ASM) $(AFLAGS) -o ./$(BDIR)/boot.o ./kernel/boot.s @echo "Link object files..." - $(LD) -m elf_x86_64 -o ./$(BDIR)/kernel.bin -T ./kernel/linker.ld ./$(BDIR)/*.o + $(LD) -m elf_i386 -o ./$(BDIR)/kernel.bin -T ./kernel/linker.ld ./$(BDIR)/*.o @echo "Project was built" clean: |
