-
Notifications
You must be signed in to change notification settings - Fork 17
/
rules.mk
78 lines (60 loc) · 2.74 KB
/
rules.mk
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
# Template rules.mk file.
# First, include the standard libmaple rules.mk header. Leave this
# line alone.
include $(MAKEDIR)/header.mk
###############################################################################
### Change this middle section for your project.
### Source subdirectories
# If any subdirectories contain source files, we have to add them to
# the variable BUILDDIRS, like this. $(BUILD_PATH) is the directory
# where compilation output (like object files) goes. The variable $(d)
# gets expanded to the directory containing this rules.mk file.
#BUILDDIRS += $(BUILD_PATH)/$(d)/getter
#BUILDDIRS += $(BUILD_PATH)/$(d)/randomizer
### Local flags: these control how the compiler gets called.
# Here we set a variable for our project's include directory. Note
# that the project top-level directory (i.e., the one containing this
# rules.mk file) is automatically used for include files, so you don't
# need to add it here.
EXAMPLE_INCLUDE_DIR := $(d)/include
# CFLAGS_$(d) are additional flags you want to give the C compiler.
# WIRISH_INCLUDES and LIBMAPLE_INCLUDES provide the appropriate GCC -I
# switches to let you include libmaple headers. FOO_INCLUDES gives the
# include switches you need for the foolib headers.
CFLAGS_$(d) := $(WIRISH_INCLUDES) $(LIBMAPLE_INCLUDES) $(FOO_INCLUDES)
# We'll also want our local include directory
CFLAGS_$(d) += -I$(EXAMPLE_INCLUDE_DIR)
# CXXFLAGS_$(d) are extra flags passed to the C++ compiler. We'll need
# our include directory, and we'll also add an extra definition as a
# demo (look in getter.cpp for how it's used).
CXXFLAGS_$(d) := -I$(EXAMPLE_INCLUDE_DIR)
# ASFLAGS_$(d) are extra flags passed to the assembler. We don't
# have any assembly language files in this example, so we'll just
# leave it empty.
ASFLAGS_$(d) :=
### Local rules
# You can add any additional rules you want here. We don't have
# any extra rules to add.
### Source files
# cSRCS_$(d) are the C source files we want compiled.
cSRCS_$(d) :=
# cppSRCS_$(d) are the C++ sources we want compiled. We have our own
# main.cpp, and one additional file.
#
# We can't call our main file main.cpp, or libmaple's build system
# will get confused and try to build it without our CXXFLAGS. So call
# it something else. Annoying! Hopefully LeafLabs will fix it soon.
cppSRCS_$(d) := real-main.cpp
cppSRCS_$(d) += setup.cpp
cppSRCS_$(d) += adc.cpp
cppSRCS_$(d) += pid.cpp
cppSRCS_$(d) += registers.cpp
cppSRCS_$(d) += banks.cpp
cppSRCS_$(d) += pwm.cpp
cppSRCS_$(d) += packetprocess.cpp
cppSRCS_$(d) += i2c_module.cpp
# sSRCS_$(d) are the assembly sources. We don't have any.
sSRCS_$(d) :=
###############################################################################
# Include the libmaple rules.mk footer. Leave this line alone.
include $(MAKEDIR)/footer.mk