Statistics
| Branch: | Revision:

amiro-apps / configurations / HelloWorld / modules / NUCLEO-L476RG / Makefile @ 6d4ba740

History | View | Annotate | Download (5.725 KB)

1
################################################################################
2
# AMiRo-Apps is a collection of applications for the Autonomous Mini Robot     #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2018..2020  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

    
24

    
25

    
26
################################################################################
27
# Build global options                                                         #
28
# NOTE: Can be overridden externally.                                          #
29
#                                                                              #
30

    
31
# Compiler options here.
32
ifeq ($(USE_OPT),)
33
  USE_OPT = -O2 -fomit-frame-pointer -falign-functions=16 -fstack-usage
34
  export USE_OPT
35
endif
36

    
37
# C specific options here (added to USE_OPT).
38
ifeq ($(USE_COPT),)
39
  USE_COPT = -std=c11
40
  export USE_COPT
41
endif
42

    
43
# C++ specific options here (added to USE_OPT).
44
ifeq ($(USE_CPPOPT),)
45
  USE_CPPOPT = -fno-rtti -std=c++17
46
  export USE_CPPOPT
47
endif
48

    
49
# Enable this if you want the linker to remove unused code and data
50
ifeq ($(USE_LINK_GC),)
51
  USE_LINK_GC = yes
52
 export USE_LINK_GC
53
endif
54

    
55
# Linker extra options here.
56
ifeq ($(USE_LDOPT),)
57
  USE_LDOPT =
58
  export USE_LDOPT
59
endif
60

    
61
# Enable this if you want link time optimizations (LTO)
62
ifeq ($(USE_LTO),)
63
  USE_LTO = yes
64
  export USE_LTO
65
endif
66

    
67
# If enabled, this option allows to compile the application in THUMB mode.
68
ifeq ($(USE_THUMB),)
69
  USE_THUMB = yes
70
  export USE_THUMB
71
endif
72

    
73
# Enable this if you want to see the full log while compiling.
74
ifeq ($(USE_VERBOSE_COMPILE),)
75
  USE_VERBOSE_COMPILE = no
76
  export USE_VERBOSE_COMPILE
77
endif
78

    
79
#                                                                              #
80
# Build global options                                                         #
81
################################################################################
82

    
83
################################################################################
84
# Sources and paths                                                            #
85
#                                                                              #
86

    
87
# environment setup
88
include ../modules.mk
89

    
90
# include apps
91
include $(APPS_DIR)/HelloWorld/HelloWorld.mk
92

    
93
# middleware setup
94
include $(MIDDLEWARE_DIR)/middleware.mk
95

    
96
# C sources
97
APPS_CSRC += $(HelloWorldAPP_CSRC) \
98
             $(MIDDLEWARE_CSRC)
99

    
100
# C++ sources
101
APPS_CPPSRC += $(HelloWorldAPP_CPPSRC) \
102
               $(MIDDLEWARE_CPPSRC)
103

    
104
# include directories for configurations
105
APPS_INC += $(realpath .) \
106
            $(HelloWorldAPP_INC) \
107
            $(MIDDLEWARE_INC)
108

    
109
#                                                                              #
110
# Sources and paths                                                            #
111
################################################################################
112

    
113
################################################################################
114
# Start of user section                                                        #
115
#                                                                              #
116

    
117
# List all user defines here
118
UDEFS +=
119
export UDEFS
120

    
121
# List all ASM defines here
122
UADEFS +=
123
export UADEFS
124

    
125
# List all user directories here
126
UINCDIR +=
127
export UINCDIR
128

    
129
# List all directories to look for user libraries here
130
ULIBDIR +=
131
export ULIBDIR
132

    
133
# List all user libraries here
134
ULIBS +=
135
export ULIBS
136

    
137
#                                                                              #
138
# End of user defines                                                          #
139
################################################################################
140

    
141
################################################################################
142
# Start of targets section                                                     #
143
# 
144

    
145
# set the build directory
146
ifeq ($(BUILDDIR),)
147
  BUILDDIR = $(realpath .)/build
148
endif
149
export BUILDDIR
150

    
151
# call Makefile from OS
152
all:
153
	$(MAKE) -C $(OS_DIR)/AMiRo-OS/modules/NUCLEO-L476RG/
154

    
155
clean:
156
	$(MAKE) -C $(OS_DIR)/AMiRo-OS/modules/NUCLEO-L476RG/ clean
157

    
158
flash:
159
	$(MAKE) -C $(OS_DIR)/AMiRo-OS/modules/NUCLEO-L476RG/ flash
160

    
161
#                                                                              #
162
# End of targets section                                                       #
163
################################################################################