+
+
+UNCRUSTIFY_FILES = $(shell git ls-files|git check-attr --stdin uncrustify|awk -F: '/uncrustify: set$$/ {print $$1}')
+UNCRUSTIFY_CFG = etc/uncrustify.cfg
+define UNCRUSTIFY_ALL
+$(foreach i,$(UNCRUSTIFY_FILES),git show HEAD:$i | uncrustify -c $(UNCRUSTIFY_CFG) -o $i
+)
+endef
+
+# Usage: Run 'make uncrustify' and then 'git add -p' to commit the
+# changes you agree with.
+uncrustify:
+ git diff --quiet # Check that the tree is clean
+ $(UNCRUSTIFY_ALL)
+
+
+include common.mk
+
+$(eval $(call release_rules,rpp-lib))
+release: $(RELEASE_BASENAME).zip
+
+$(RELEASE_BASENAME)::
+# lwIP
+ git --git-dir=lwip/.git archive --prefix=$@/lwip/ $(RELEASE_COMMIT) | tar xf -
+# API doc
+ rm -rf rpp/doc/api/html
+ $(MAKE) -C rpp/doc/api
+ mkdir -p $@/rpp/doc/api/html
+ cp -rT rpp/doc/api/html $@/rpp/doc/api/html