]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - Makefile
Change license to MIT
[pes-rpp/rpp-lib.git] / Makefile
index 33dbb5356354e1479a2c02ecdf51d9268274799a..74efa02c46249cf579d333a70ec5855ee15d3d80 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,16 +3,32 @@
 # Authors:
 #     - Michal Sojka <sojkam1@fel.cvut.cz>
 #
-# This document contains proprietary information belonging to Czech
-# Technical University in Prague. Passing on and copying of this
-# document, and communication of its contents is not permitted
-# without prior written authorization.
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
 #
 # File : Makefile
 # Abstract:
 #       This makefile tries to build all RPP projects in this repository.
 
-TARGETS=rm48_hdk tms570_hdk 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)
 
@@ -20,10 +36,13 @@ subdir-targets = $(SUBDIRS:%=subdir-%)
 
 all: $(subdir-targets)
 
+print-targets:
+       @echo "Building for targets: $(TARGETS)"
+
 clean: $(subdir-targets)
 
 lib: # Build only the library
-       $(MAKE) -C build/tms570_hdk/Debug
+       $(MAKE) -C build/tms570_hydctr/Debug
 
 doc: # Build API documentation (Doxygen)
        $(MAKE) -C rpp/doc/api/
@@ -37,11 +56,11 @@ doc: # Build API documentation (Doxygen)
 # parallel.
 .NOTPARALLEL:
 
-subdir-build/%:
+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
@@ -55,9 +74,9 @@ uncrustify:
        $(UNCRUSTIFY_ALL)
 
 
-RELEASE_PREFIX = rpp-lib
 include common.mk
 
+$(eval $(call release_rules,rpp-lib))
 release: $(RELEASE_BASENAME).zip
 
 $(RELEASE_BASENAME)::