mem ?= 128 CFLAGS = -m32 -fno-builtin -fno-stack-protector -fno-strict-aliasing -fno-delete-null-pointer-checks -nostdinc -I. -g -Wall -std=c99 all: build run run: qemu-system-i386 -hda disk.img -m 256 -vnc :1 & sleep 0.1s ~/vnc/opt/TigerVNC/bin/vncviewer :1 bash -c "kill `pidof qemu-system-i386`" mount: mount -t ext2 disk.img /mnt -o loop,offset=32256 build: memos-2.ld memos-2.s as --32 memos-2.s -o memos-2.o gcc $(CFLAGS) memos-2.c -c -o memos-2c.o ld -T memos-2.ld memos-2.o memos-2c.o -o memos-2 cp memos-2 /mnt/boot/ sync clean: rm *.o *.bin