-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
85 lines (66 loc) · 1.91 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#******************************************************************************
#
# Makefile - Rules for building the binary merger creator.
# Author: Paul Archer
# Creation Date: August, 2008
#
# THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
# OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
# LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
# CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
#
#******************************************************************************
# VERBOSE = 1
DEBUG = 1
BUILD = build
include Makedefs
include Makefile.list
.PHONY: default_target
default_target: all
################################
# Compiler Flags
################################
PRJ_CFLAGS = -Wall -O
ifdef DEBUG
TARGET_OPTS = -O0 -g
PRJ_CFLAGS += -DDEBUG
else
TARGET_OPTS = -O2
PRJ_CFLAGS += -DNDEBUG
endif
INCLUDE_DIRS = -I include
CFLAGS += $(TARGET_OPTS) $(INCLUDE_DIRS) $(PRJ_CFLAGS)
################################
# The default build
# ################################
all: fitdecode
################################
# HW features creator
################################
fitdecode: ${BUILD}/fitdecode
${BUILD}/fitdecode: $(OBJS)
################################
# The rule to clean out all the build products
# ################################
.PHONY: clean
clean:
@rm -rf ${BUILD}
.PHONY: distclean
distclean: clean
@rm tags
################################
# Rules to remake the c/etags
################################
.PHONY: cfile
cfile:
@ find src -name \*.\[ch\] > cfile.list
@ find include -name \*.\[ch\] >> cfile.list
.PHONY: tags
tags: cfile
ctags -L cfile.list
@ rm cfile.list
################################
# Include the automatically generated dependency files.
# ################################
-include $(wildcard $(BUILD)/objs/*.d)