1 RELEASE_PREFIX = rpp-simulink
3 include rpp/lib/Makefile.var
4 include rpp/lib/common.mk
6 TESTSW_LIB_COMMIT = git --git-dir=doc/test-sw/rpp-lib/.git rev-parse HEAD
7 SIMULINK_LIB_COMMIT = git --git-dir=rpp/lib/.git rev-parse HEAD
9 release: $(RELEASE_BASENAME).zip
10 if [ $$($(SIMULINK_LIB_COMMIT)) != $$($(TESTSW_LIB_COMMIT)) ]; then echo >&2 "Library version mismatch"; exit 1; fi
11 cp rpp/lib/$(shell make -C rpp/lib --silent print-release-basename).zip .
12 $(MAKE) -C doc/test-sw release
13 cp doc/test-sw/$(shell make -C doc/test-sw --silent print-release-basename).zip .
14 cp doc/rpp_simulink.pdf rpp_simulink-$(RELEASE_VERSION).pdf
16 RELEASE_TARGET ?= tms570_hydctr
17 include rpp/lib/build/$(RELEASE_TARGET)/Makefile.config
19 RELEASE_LIB_GIT_FILES = \
21 build/$(RELEASE_TARGET)/$(TARGET_CCXML) \
22 build/$(RELEASE_TARGET)/$(TARGET_LDCMD) \
23 build/Makefile.rules \
24 build/Makefile.rules.arm \
25 os/$(rpp_lib_OS)/include/ \
28 ifneq ($(filter lwip/src/include,$(rpp_lib_INCLUDES)),)
29 RELEASE_LIB_GIT_FILES += lwip/src/include/
32 RELEASE_LIB_GEN_FILES = Makefile.config rpp-lib.lib
34 $(RELEASE_BASENAME):: LIB_RELEASE_BASENAME:=$(shell make -C rpp/lib --silent print-release-basename)
35 $(RELEASE_BASENAME):: lib
36 # Copy library headers and binaries
37 git --git-dir=rpp/lib/.git archive --worktree-attributes --prefix=$@/rpp/lib/ HEAD $(RELEASE_LIB_GIT_FILES) | tar xf -
38 cp --parents $(RELEASE_LIB_GEN_FILES:%=rpp/lib/%) $@/
39 # Compile and include the PDF documentation
42 cp doc/rpp_simulink.pdf $@/doc
45 $(MAKE) -C rpp/lib/build/$(RELEASE_TARGET)/Release # Compile the lib
46 $(MAKE) -C rpp/lib release # Create release zip and directory