]> git.dujemihanovic.xyz Git - nameless-os.git/blobdiff - Makefile
kernel: Enable -O2 and LTO again
[nameless-os.git] / Makefile
index 993a455b631b63c0d082d7150a80de0394bff5b3..502430a15416276d15b523929b7ec878ba26867b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,20 @@
+export CROSS_COMPILE = i686-elf-
 export AS = yasm
-export CC = i686-elf-gcc
-export QEMU = qemu-system-i386 -monitor stdio
+export CC = gcc
+export QEMU = qemu-system-i386 -monitor stdio -cpu pentium2
 export GIT_REV = $(shell git describe --long HEAD)
+export REAL_CC = $(CROSS_COMPILE)$(CC)
+export CFLAGS
+export LDFLAGS
+export ASFLAGS
 MAKEFLAGS += -rR
 
 default: kernel/kernel.elf bootloader
 all: default boot/x86/disk.img
 run: all
-       $(QEMU) boot/x86/disk.img
+       $(QEMU) -drive file=boot/x86/disk.img,format=raw,throttling.iops-total=100
 debug: all
-       $(QEMU) -s -S boot/x86/disk.img
+       $(QEMU) -s -S -drive file=boot/x86/disk.img,format=raw,throttling.iops-total=100
 
 kernel/kernel.elf:
        $(MAKE) -C kernel