toaruos/Makefile

30 lines
495 B
Makefile
Raw Normal View History

2011-01-17 22:58:31 +03:00
include Makefile.inc
DIRS = core
.PHONY: all clean install core
2011-01-16 04:01:19 +03:00
all: kernel
install: kernel
mount bootdisk.img /mnt -o loop
cp kernel /mnt/kernel
umount /mnt
cp kernel /boot/toaruos-kernel
2011-01-16 04:01:19 +03:00
2011-01-17 22:58:31 +03:00
kernel: start.o link.ld main.o core
${LD} -T link.ld -o kernel *.o core/*.o
2011-01-16 04:01:19 +03:00
%.o: %.c
2011-01-17 22:58:31 +03:00
${CC} ${CFLAGS} -I./include -c -o $@ $<
core:
cd core; ${MAKE} ${MFLAGS}
2011-01-16 04:01:19 +03:00
start.o: start.asm
nasm -f elf -o start.o start.asm
clean:
2011-01-17 22:58:31 +03:00
-rm -f *.o kernel
-for d in ${DIRS}; do (cd $$d; ${MAKE} clean); done