Skip to content

Commit

Permalink
Extracted common targets
Browse files Browse the repository at this point in the history
  • Loading branch information
aweeraman committed Sep 21, 2020
1 parent 4db2cc2 commit 35d4d5f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 19 additions & 0 deletions make/common.mk
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 35d4d5f

Please sign in to comment.