summaryrefslogtreecommitdiff
path: root/Makefile
blob: 76204f753f9668dfc5196bd58144a28351029565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.PHONY: all clean $(DIRS_CLEAN)

BOOT_DIR := boot
BOOT_FILE := $(BOOT_DIR)/kjarna.efi

SERVICE_DIR := service
SERVICE_FILE := $(SERVICE_DIR)/kjarna.os

TARGETS := $(SERVICE_FILE) $(BOOT_FILE)
DIRS := $(SERVICE_DIR) $(BOOT_DIR)

DIRS_CLEAN := $(addprefix clean-,$(DIRS))
DIRS_DISTCLEAN := $(addprefix distclean-,$(DIRS))

all: $(TARGETS)

clean: $(DIRS_CLEAN)
distclean: $(DIRS_DISTCLEAN)

$(DIRS_CLEAN): clean-%:
	$(MAKE) -C $* clean

$(DIRS_DISTCLEAN): distclean-%:
	$(MAKE) -C $* distclean

$(TARGETS):
	$(MAKE) -C $(dir $@)