forked from cahirwpz/FreeRTOS-Amiga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 1.06 KB
/
Makefile
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
30
31
32
33
34
35
36
37
TOPDIR = $(realpath .)
SUBDIR = tools FreeRTOS drivers libc examples
BUILD-FILES = bootloader.bin cscope.out tags etags
all: build
include $(TOPDIR)/build/flags.mk
include $(TOPDIR)/build/common.mk
%.bin: %.asm
@echo "[AS] $(DIR)$< -> $(DIR)$@"
$(VASM) -Fbin $(CPPFLAGS) $(VASMFLAGS) -o $@ $(realpath $<)
before-examples: bootloader.bin build-FreeRTOS build-drivers build-libc
before-FreeRTOS: build-tools
before-drivers: build-tools
before-libc: build-tools
# Lists of all files that we consider our sources.
SRCDIRS = include drivers libc FreeRTOS
SRCFILES_C = $(shell find $(SRCDIRS) -iname '*.[ch]')
SRCFILES_ASM = $(shell find $(SRCDIRS) -iname '*.S')
SRCFILES = $(SRCFILES_C) $(SRCFILES_ASM)
cscope.out: $(SRCFILES)
@echo "[CSCOPE] Rebuilding database..."
$(CSCOPE) $(SRCFILES)
tags etags: $(SRCFILES)
@echo "[CTAGS] Rebuilding tags..."
$(CTAGS) --language-force=c $(SRCFILES_C)
$(CTAGS) --language-force=c -e -f etags $(SRCFILES_C)
$(CTAGS) --language-force=asm -a $(SRCFILES_ASM)
$(CTAGS) --language-force=asm -aef etags $(SRCFILES_ASM)
# vim: ts=8 sw=8 noet