From 28fe545925732a5cadd1f5b55fe9324778da25e5 Mon Sep 17 00:00:00 2001 From: aqua Date: Sat, 29 Oct 2022 15:27:06 +0300 Subject: Remove meson.build files --- Makefile | 51 ++++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e0dba8f..d10fd2a 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,31 @@ -MAKE = make -ARCH = i686 +MAKE = make +MAKEFLAGS += --no-print-directory +ARCH = i686 include ${ARCH}/toolchain.mk info: @echo "this is the all target" - @echo "ARCH ${ARCH}" - @echo "BUILD ${BUILD}" - @echo " MAKE ${MAKE}" - @${MAKE} --version | head -n1 - @echo " CC ${CC} ${CCFLAGS}" - @${CC} --version | head -n1 - @echo " LD ${LD} ${LDFLAGS}" - @${LD} --version | head -n1 + @echo " ARCH ${ARCH}" + @echo " MAKE $(shell ${MAKE} --version | head -n1)" + @echo " CC $(shell ${CC} --version | head -n1)" + @echo " LD $(shell ${LD} --version | head -n1)" +.PHONY: all run clean purge all: lib/libk.a ${ARCH}/arch.a devices/devs.a src/kernel.a +run: glitch.iso + qemu-system-i386 -cdrom glitch.iso -accel kvm + +clean: + @${MAKE} ARCH=${ARCH} -C lib clean + @${MAKE} ARCH=${ARCH} -C ${ARCH} clean + @${MAKE} ARCH=${ARCH} -C devices clean + @${MAKE} ARCH=${ARCH} -C src clean + +purge: clean + rm -f lib/libk.a ${ARCH}/arch.a devices/devs.a src/kernel.a + rm -rf glitch.elf glitch.iso isodir + lib/libk.a: ${MAKE} ARCH=${ARCH} -C lib libk.a i686/arch.a: @@ -24,28 +35,14 @@ devices/devs.a: src/kernel.a: ${MAKE} ARCH=${ARCH} -C src kernel.a -glitch.elf: ${ARCH}/arch.a devices/devs.a lib/libk.a src/kernel.a - ${LD} ${LDFLAGS} -T ${ARCH}/linker.ld -o $@\ - $(wildcard i686/*.o) \ - src/kernel.a \ - -Llib -lk devices/devs.a +glitch.elf: ${ARCH}/arch.a src/kernel.a devices/devs.a lib/libk.a + ${LD} ${LDFLAGS} -T ${ARCH}/linker.ld -o $@ $^ glitch.iso: glitch.elf grub/grub.cfg + grub-file --is-x86-multiboot2 glitch.elf mkdir -p isodir/boot/grub mkdir -p isodir/boot/glitch cp grub/grub.cfg isodir/boot/grub/grub.cfg cp glitch.elf isodir/boot/glitch/glitch.elf grub-mkrescue -o glitch.iso isodir -run: glitch.iso - qemu-system-i386 -cdrom glitch.iso -accel kvm - -clean: - ${MAKE} ARCH=${ARCH} -C lib clean - ${MAKE} ARCH=${ARCH} -C ${ARCH} clean - ${MAKE} ARCH=${ARCH} -C devices clean - ${MAKE} ARCH=${ARCH} -C src clean -purge: clean - rm -f lib/libk.a ${ARCH}/arch.a devices/devs.a src/kernel.a - rm -rf isodir - -- cgit v1.2.1