# This makefile tries to build all RPP projects in this repository. SUBDIRS = Debug POSIX apps/rpp-test-suite/Debug apps/rpp-test-suite/POSIX subdir-targets = $(SUBDIRS:%=subdir-%) all: $(subdir-targets) clean: $(subdir-targets) lib: # Build only the library $(MAKE) -C Debug doc: # Build API documentation (Doxygen) $(MAKE) -C rpp/doc/api/ .PHONY: all clean lib # Multiple submakes are invoked in the same directory - e.g. # rpp-test-suite/Debug/GNUmakefile invokes Debug/GNUmakefile. We don't # want these targets to be invoked twice so we forbid parallel # invocation in this Makefile. Note that the submakes still run in # parallel. .NOTPARALLEL: subdir-% subdir-apps/%: $(MAKE) -C $(@:subdir-%=%) $(MAKECMDGOALS) C_H_FILES = $(shell git ls-files|grep -e '\.[ch]$$'|grep -v -E '^(os/|lwip/|rpp/include/ul/|rpp/include/sys/(ti_drv_|sys_)|rpp/src/sys/(ti_drv_|sys)|rpp/include/sys/std_nhet.h|rpp/include/sys/system.h|rpp/src/sys/phy_dp83848h.c)') UNCRUSTIFY_CFG = $(dir $(lastword $(MAKEFILE_LIST)))/etc/uncrustify.cfg define UNCRUSTIFY_ALL $(foreach i,$(C_H_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)