32 lines
569 B
Makefile
32 lines
569 B
Makefile
TOPDIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
SYSROOTDIR := $(TOPDIR)/sysroot
|
|
TOOLSDIR := $(TOPDIR)/tools
|
|
|
|
RM = echo
|
|
|
|
SUBDIRS := kernel lib bin
|
|
|
|
TARGET = stupid.iso stupid.tar.gz
|
|
|
|
.PHONY: all
|
|
all: $(TARGET)
|
|
|
|
GOAL:=install
|
|
clean: GOAL:=clean
|
|
|
|
.PHONY: $(SUBDIRS)
|
|
$(SUBDIRS):
|
|
@echo "📁 $@"
|
|
DESTDIR=$(SYSROOTDIR) $(MAKE) -C $@ $(GOAL)
|
|
|
|
.PHONY: stupid.iso
|
|
stupid.iso: $(SUBDIRS)
|
|
$(TOPDIR)/tools/create-iso $@ sysroot
|
|
|
|
.PHONY: stupid.tar.gz
|
|
stupid.tar.gz: $(SUBDIRS)
|
|
tar -czvf $@ sysroot
|
|
|
|
.PHONY: clean
|
|
clean: $(SUBDIRS)
|
|
$(RM) $(TARGET) $(SYSROOTDIR)
|