1 # Copyright (C) 2013-2014 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.
13 # This makefile tries to build all RPP projects in this repository.
15 SUBDIRS = Debug POSIX apps/rpp-test-suite/Debug apps/rpp-test-suite/POSIX
17 subdir-targets = $(SUBDIRS:%=subdir-%)
19 all: $(subdir-targets)
21 clean: $(subdir-targets)
23 lib: # Build only the library
26 doc: # Build API documentation (Doxygen)
27 $(MAKE) -C rpp/doc/api/
31 # Multiple submakes are invoked in the same directory - e.g.
32 # rpp-test-suite/Debug/GNUmakefile invokes Debug/GNUmakefile. We don't
33 # want these targets to be invoked twice so we forbid parallel
34 # invocation in this Makefile. Note that the submakes still run in
38 subdir-% subdir-apps/%:
39 $(MAKE) -C $(@:subdir-%=%) $(MAKECMDGOALS)
42 UNCRUSTIFY_FILES = $(shell git ls-files|git check-attr --stdin uncrustify|awk -F: '/uncrustify: set$$/ {print $$1}')
43 UNCRUSTIFY_CFG = etc/uncrustify.cfg
45 $(foreach i,$(UNCRUSTIFY_FILES),git show HEAD:$i | uncrustify -c $(UNCRUSTIFY_CFG) -o $i
49 # Usage: Run 'make uncrustify' and then 'git add -p' to commit the
50 # changes you agree with.
52 git diff --quiet # Check that the tree is clean
56 RELEASE_PREFIX = rpp-lib
59 release: $(RELEASE_BASENAME).zip
63 git --git-dir=lwip/.git archive --prefix=$@/lwip/ $(RELEASE_COMMIT) | tar xf -
65 rm -rf rpp/doc/api/html
66 $(MAKE) -C rpp/doc/api
67 mkdir -p $@/rpp/doc/api/html
68 cp -rT rpp/doc/api/html $@/rpp/doc/api/html