1 # Copyright (C) 2013, 2015, 2019 Czech Technical University in Prague
4 # - Michal Sojka <sojkam1@fel.cvut.cz>
6 # Permission is hereby granted, free of charge, to any person
7 # obtaining a copy of this software and associated documentation
8 # files (the "Software"), to deal in the Software without
9 # restriction, including without limitation the rights to use,
10 # copy, modify, merge, publish, distribute, sublicense, and/or sell
11 # copies of the Software, and to permit persons to whom the
12 # Software is furnished to do so, subject to the following
15 # The above copyright notice and this permission notice shall be
16 # included in all copies or substantial portions of the Software.
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20 # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 # OTHER DEALINGS IN THE SOFTWARE.
31 include ../lib/Makefile.config
33 DEMOS = $(demos_$(TARGET))
35 demos_rm48_hdk = $(demos_hdk)
36 demos_tms570_hdk = $(demos_hdk)
37 demos_tms570_hydctr = $(demos_hydctr)
60 analog_passthrough_rpp \
66 digital_passthrough_rpp \
70 hbridge_analog_control_rpp \
71 hbridge_digital_control_rpp \
72 hbridge_sinewave_control_rpp \
77 log_analog_input_rpp \
81 # Check that each demo is used for least one target
82 all_demos = $(wildcard *.slx)
83 unused_demos = $(filter-out $(sort $(demos_hdk) $(demos_hydctr) $(demos_tms570_rpp)),$(all_demos:%.slx=%))
84 missing_demos = $(filter-out $(all_demos:%.slx=%),$(sort $(DEMOS)))
85 $(if $(unused_demos),$(error Unused demos: $(unused_demos)))
86 $(if $(missing_demos),$(error Missing demos: $(missing_demos)))
89 matlab -nojvm -r "try; rpp_build_demos $(DEMOS); catch ME, disp(getReport(ME)); exit(1); end; exit(0)"
92 $(MAKE) -C ../lib rpp-lib.lib
94 MODELS=$(wildcard *.slx)
95 BUILD_DIRS=$(MODELS:%.slx=%_rpp)
100 print: # Used by buildbot