diff --git a/Makefile b/Makefile index 135e7df..d6c347c 100644 --- a/Makefile +++ b/Makefile @@ -9,27 +9,7 @@ ARCH ?= x86 -include config/build_$(ARCH).cfg -include make/$(ARCH).mk - -## Usage: make [ARCH=arm|x86] [TARGET] -## Available targets: -## tags: generates tag file for source code -tags: - @ctags --exclude=deps/* -R . - -## clean: clears generated files -clean: - @rm -rf $(ISO) iso odyssey.img odyssey-coverity.tar.gz cov-int - @rm -f odyssey odyssey.map odyssey.bin - @find . -not -path "./deps/*" -not -path "./.git/*" \ - \( -name '*.o' -o -name '*.d' -o -name '*.bin' \) \ - -exec rm {} \; - @rm -f tags - @$(MAKE) -C tools/ppm-to-array clean 2>/dev/null - -## help: how to build and run -help: - @sed -n 's/^## //p' Makefile make/*.mk - +-include make/common.mk -include make/qemu.mk -include make/deps.mk -include make/coverity.mk diff --git a/make/common.mk b/make/common.mk new file mode 100644 index 0000000..bac5e53 --- /dev/null +++ b/make/common.mk @@ -0,0 +1,19 @@ +## Usage: make [ARCH=arm|x86] [TARGET] +## Available targets: +## tags: generates tag file for source code +tags: + @ctags --exclude=deps/* -R . + +## clean: clears generated files +clean: + @rm -rf $(ISO) iso odyssey.img odyssey-coverity.tar.gz cov-int + @rm -f odyssey odyssey.map odyssey.bin + @find . -not -path "./deps/*" -not -path "./.git/*" \ + \( -name '*.o' -o -name '*.d' -o -name '*.bin' \) \ + -exec rm {} \; + @rm -f tags + @$(MAKE) -C tools/ppm-to-array clean 2>/dev/null + +## help: how to build and run +help: + @sed -n 's/^## //p' Makefile make/*.mk