Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / Makefile @ 9487b4cd

History | View | Annotate | Download (2.338 KB)

1 e545e620 Thomas Schöpping
################################################################################
2
# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
3
# (AMiRo) platform.                                                            #
4 84f0ce9e Thomas Schöpping
# Copyright (C) 2016..2019  Thomas Schöpping et al.                            #
5 e545e620 Thomas Schöpping
#                                                                              #
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 6b1000b5 Thomas Schöpping
# absolute path to this directory
27
MODULES_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
28 e545e620 Thomas Schöpping
29 6b1000b5 Thomas Schöpping
# list of available modules
30
MODULES = $(patsubst $(MODULES_DIR)%/,%,$(sort $(dir $(wildcard $(MODULES_DIR)*/*))))
31
32
# set custom build directory, if any
33 870f74ac Thomas Schöpping
ifneq ($(BUILDDIR),)
34
  export BUILDDIR
35
endif
36 e545e620 Thomas Schöpping
37
CLEANTRGS = $(MODULES:%=clean_%)
38
FLASHTRGS = $(MODULES:%=flash_%)
39
40 1e5f7648 Thomas Schöpping
.PHONY: all $(MODULES) $(FLASHTRGS) clean $(CLEANTRGS)
41 5d7e6f9e Thomas Schöpping
42 870f74ac Thomas Schöpping
all: $(MODULES)
43 e545e620 Thomas Schöpping
$(MODULES):
44
	$(MAKE) -C $(MODULES_DIR)$@
45
46
$(FLASHTRGS):
47
	$(MAKE) -C $(MODULES_DIR)$(@:flash_%=%) flash
48
49
clean: $(CLEANTRGS)
50
$(CLEANTRGS):
51
	$(MAKE) -C $(MODULES_DIR)$(@:clean_%=%) clean