StupidOS/Makefile

42 lines
650 B
Makefile
Raw Normal View History

2023-01-15 19:25:25 +00:00
.SUFFIXES:
.DELETE_ON_ERROR:
.DEFAULT_GOAL := all
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
AS = nasm
LD = ld.lld
OBJDUMP = llvm-objdump
RM = rm -f
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
BIN_DIR = bin
DOC_DIR = doc
KERNEL_DIR = kernel
LIB_DIR = lib
TOOLS_DIR = tools
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
include $(TOOLS_DIR)/build.mk
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
ASFLAGS = -DSTUPID_VERSION=\"$(shell $(GIT-VERSION))\" -Ilib
GARBADGE = stupid.img
include $(KERNEL_DIR)/build.mk
all: stupid.img
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
stupid.img: $(KERNEL_BIN) $(KERNEL_DUMP)
#stupid.img: floppy.bin kern.bin
# mkdosfs -F 12 -C $@ 1440
# dd status=noxfer conv=notrunc if=floppy.bin of=$@
# mcopy -i $@ kern.bin ::kern.sys
%.dump: %.elf
$(OBJDUMP) -D $^ > $@
clean:
$(RM) $(GARBADGE)
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
re: clean all
2020-05-06 10:40:10 +00:00
2023-01-15 19:25:25 +00:00
.PHONY: all clean re