]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - Makefile
Enable ethernet interrupts for all platforms
[pes-rpp/rpp-lib.git] / Makefile
index e839f00026059caae9b60b294e6dbf1cc8acc138..16188fe1bcfc2684866b4672ddd5414e50c0a0a4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014 Czech Technical University in Prague
+# Copyright (C) 2013-2015 Czech Technical University in Prague
 #
 # Authors:
 #     - Michal Sojka <sojkam1@fel.cvut.cz>
 # Abstract:
 #       This makefile tries to build all RPP projects in this repository.
 
-SUBDIRS = Debug POSIX apps/rpp-test-suite/Debug apps/rpp-test-suite/POSIX
+TARGETS=$(sort $(notdir $(patsubst %/,%,$(dir $(wildcard build/*/Makefile.config)))))
+
+SUBDIRS = $(foreach t,$(TARGETS),build/$(t)/Debug build/$(t)/apps/helloworld build/$(t)/apps/rpp-test-suite)
 
 subdir-targets = $(SUBDIRS:%=subdir-%)
 
 all: $(subdir-targets)
 
+print-targets:
+       @echo "Building for targets: $(TARGETS)"
+
 clean: $(subdir-targets)
 
 lib: # Build only the library
-       $(MAKE) -C Debug
+       $(MAKE) -C build/tms570_hydctr/Debug
 
 doc: # Build API documentation (Doxygen)
        $(MAKE) -C rpp/doc/api/
@@ -35,11 +40,11 @@ doc: # Build API documentation (Doxygen)
 # parallel.
 .NOTPARALLEL:
 
-subdir-% subdir-apps/%:
+subdir-build/%: print-targets
        $(MAKE) -C $(@:subdir-%=%) $(MAKECMDGOALS)
 
 
-UNCRUSTIFY_FILES = $(shell git ls-files|git check-attr --stdin uncrustify|awk -F: '/uncrustify: set$$/ {print $$1}')
+UNCRUSTIFY_FILES = $(shell etc/git-ls-files-attr uncrustify)
 UNCRUSTIFY_CFG = etc/uncrustify.cfg
 define UNCRUSTIFY_ALL
 $(foreach i,$(UNCRUSTIFY_FILES),git show HEAD:$i | uncrustify -c $(UNCRUSTIFY_CFG) -o $i
@@ -53,9 +58,9 @@ uncrustify:
        $(UNCRUSTIFY_ALL)
 
 
-RELEASE_PREFIX = rpp-lib
 include common.mk
 
+$(eval $(call release_rules,rpp-lib))
 release: $(RELEASE_BASENAME).zip
 
 $(RELEASE_BASENAME)::