1 # Copyright (C) 2013, 2015 Czech Technical University in Prague
4 # - Michal Sojka <sojkam1@fel.cvut.cz>
6 # This document contains proprietary information belonging to Czech
7 # Technical University in Prague. Passing on and copying of this
8 # document, and communication of its contents is not permitted
9 # without prior written authorization.
15 include ../lib/Makefile.config
17 SF = $(wildcard sfunction_*.c)
18 HTML = $(SF:%.c=%.html)
19 MEX = $(SF:%.c=%.mexa64)
21 all: $(MEX) $(HTML) rpp_lib.slx
24 rm -rf $(MEX) $(HTML) rpp_lib.slx
26 ################################
27 # S-functions and documentation
28 ################################
33 MATLAB=$(shell cd $(dir $(shell readlink -f $$(which mex)))/..; pwd)
34 CAN_BLOCKS=sfunction_cantransmit.mexa64 sfunction_canreceive.mexa64
35 $(CAN_BLOCKS): CFLAGS=-I$(MATLAB)/toolbox/shared/can/src/scanutil -I$(MATLAB)/toolbox/rtw/targets/common/can/datatypes
36 $(CAN_BLOCKS): $(MATLAB)/toolbox/rtw/targets/common/can/datatypes/sfun_can_util.c $(MATLAB)/toolbox/rtw/targets/common/can/datatypes/can_msg.c
39 scripts/doc_parse.py --printhelp --html $< > $@
42 matlab -nodesktop -nojvm -r "exit(rpp_update_doc('diff') > 0)"
45 matlab -nodesktop -nojvm -r "try, rpp_update_doc('update'); catch ME, disp(getReport(ME)); exit(1); end; exit(0)" | sed -e "s/\x1b\(\[?1[hl]\|[=>]\)//g" | tee update-doc.log
47 define PRINT_COMMIT_MSG
48 (echo "Update block masks by running rpp_update_doc.m"; echo; echo "Changelog:"; sed -n -e '/^Processing rpp_lib/,$$ p' update-doc.log)
51 commit-doc: update-doc
52 $(PRINT_COMMIT_MSG) | git commit -F - rpp_lib.slx
54 ################################
56 ################################
58 BLOCKS = $(blocks_$(TARGET))
60 blocks_rm48_hdk = $(BLOCKS_HDK)
61 blocks_tms570_hdk = $(BLOCKS_HDK)
77 matlab -nodesktop -nojvm -r "try, rpp_generate_lib $(BLOCKS); catch ME, disp(getReport(ME)); exit(1); end; exit(0)"