2024-02-04 19:18:52 +00:00
|
|
|
TOPDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
SYSROOTDIR := $(TOPDIR)/sysroot
|
|
|
|
TOOLSDIR := $(TOPDIR)/tools
|
2020-05-06 10:40:10 +00:00
|
|
|
|
2024-02-04 19:18:52 +00:00
|
|
|
RM = echo
|
2020-05-06 10:40:10 +00:00
|
|
|
|
2024-02-06 14:20:27 +00:00
|
|
|
SUBDIRS := boot kernel lib bin
|
2023-07-02 14:47:18 +00:00
|
|
|
|
2024-02-06 16:08:45 +00:00
|
|
|
TARGET = stupid.tar.gz floppy_boot.img
|
2024-02-06 14:20:27 +00:00
|
|
|
ifneq ($(OS),Windows_NT)
|
|
|
|
TARGET += stupid.iso
|
|
|
|
endif
|
2024-02-04 19:18:52 +00:00
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
GOAL:=install
|
|
|
|
clean: GOAL:=clean
|
|
|
|
|
|
|
|
.PHONY: $(SUBDIRS)
|
|
|
|
$(SUBDIRS):
|
|
|
|
@echo "📁 $@"
|
|
|
|
DESTDIR=$(SYSROOTDIR) $(MAKE) -C $@ $(GOAL)
|
2020-05-06 10:40:10 +00:00
|
|
|
|
2023-07-02 14:47:18 +00:00
|
|
|
.PHONY: stupid.iso
|
2024-02-04 19:18:52 +00:00
|
|
|
stupid.iso: $(SUBDIRS)
|
2023-07-02 14:47:18 +00:00
|
|
|
$(TOPDIR)/tools/create-iso $@ sysroot
|
|
|
|
|
|
|
|
.PHONY: stupid.tar.gz
|
2024-02-04 19:18:52 +00:00
|
|
|
stupid.tar.gz: $(SUBDIRS)
|
2023-07-02 14:47:18 +00:00
|
|
|
tar -czvf $@ sysroot
|
|
|
|
|
2024-02-06 16:08:45 +00:00
|
|
|
.PHONY: floppy_boot.img
|
|
|
|
floppy_boot.img:
|
|
|
|
@ echo
|
|
|
|
|
2024-02-04 19:18:52 +00:00
|
|
|
.PHONY: clean
|
|
|
|
clean: $(SUBDIRS)
|
|
|
|
$(RM) $(TARGET) $(SYSROOTDIR)
|