aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-05-23 21:31:48 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-05-23 21:31:48 +0300
commit960330c5d843d1aa96aa191fc27f72da563293ea (patch)
tree2d7ae69d40fa76aeb4f29d3911b7fc2f9341765d /Makefile
parentb096078c282af7233062ba242a213e6f5574cfb1 (diff)
downloadkmi-960330c5d843d1aa96aa191fc27f72da563293ea.tar.gz
kmi-960330c5d843d1aa96aa191fc27f72da563293ea.zip
new include structure, make parse easier for doxy
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9b6375c..dad5309 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ DEBUGFLAGS != [ $(RELEASE) ] \
&& echo "-flto -O2 -g -DNDEBUG" \
|| echo "-O0 -g -DDEBUG"
-CFLAGS = -ffreestanding -nostdlib -std=c17 -Wall -Wextra -Wvla
+CFLAGS = -ffreestanding -nostdlib -std=c17 -Wall -Wextra -Wvla -D$(ARCH)
DEPFLAGS = -MT $@ -MMD -MP -MF $@.d
LINTFLAGS = -fsyntax-only
PREPROCESS = -E
@@ -35,7 +35,7 @@ COMPILER != [ $(LLVM) ] \
KERNEL_SOURCES != echo common/*.c common/uapi/*.c lib/*.c
-CLEANUP := build deps.mk kernel.* init.* apos.bin docs/output
+CLEANUP := build deps.mk kernel.* init.* apos.bin
CLEANUP_CMD :=
INIT_SOURCES :=
@@ -44,8 +44,7 @@ include arch/$(ARCH)/source.mk
COMPILE_FLAGS := $(CFLAGS) $(ARCH_CFLAGS)
LINK_FLAGS := $(LDFLAGS) $(ARCH_LDFLAGS)
-INCLUDE_FLAGS := -I include -I arch/$(ARCH)/include\
- -include config.h -include arch/$(ARCH)/config.h
+INCLUDE_FLAGS := -I include -include config.h -include arch/$(ARCH)/config.h
# This makes sure .bss is loaded into the binary
OBJCOPY_FLAGS ?= -Obinary --set-section-flags .bss=alloc,load,contents
@@ -111,5 +110,10 @@ RM ?= rm -f
clean:
$(RM) -r $(CLEANUP)
-clean_run: clean
+.PHONY: clean_run
+clean_run:
$(CLEANUP_CMD)
+
+.PHONY: clean_docs
+clean_docs:
+ $(RM) -r docs/output