summaryrefslogtreecommitdiffstats
path: root/cgreen/Makefile.build
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-02-13 23:05:58 +0100
committerFred Sundvik <fsundvik@gmail.com>2016-02-13 23:05:58 +0100
commite70cefc12fb897f7221f7b1bc6fe0ce595eb2de1 (patch)
tree6a6426204c0c27589e0b210daab89dbc998d55af /cgreen/Makefile.build
parentffc425603dcbedf0da1d6aa1759f8f14f3a5e841 (diff)
downloadqmk_firmware-e70cefc12fb897f7221f7b1bc6fe0ce595eb2de1.tar.gz
qmk_firmware-e70cefc12fb897f7221f7b1bc6fe0ce595eb2de1.tar.xz
Add cgreen unit test library and makefile
Diffstat (limited to 'cgreen/Makefile.build')
-rw-r--r--cgreen/Makefile.build33
1 files changed, 33 insertions, 0 deletions
diff --git a/cgreen/Makefile.build b/cgreen/Makefile.build
new file mode 100644
index 000000000..f76165244
--- /dev/null
+++ b/cgreen/Makefile.build
@@ -0,0 +1,33 @@
+# This Makefile is copied from the cgreen top directory (where it is
+# named Makefile.build) and put in a subdirectory called 'build' where
+# builds are made This Makefile then automatically creates
+# subdirectories for C and C++ builds configuring them using the cmake
+# command. Once created you can always tweak the cmake setup as with
+# any cmake build directory
+
+all: build-c build-c++
+ for d in build-* ; do cd $$d; make ; cd .. ; done
+
+clean:
+ for d in build-* ; do cd $$d; make clean ; cd .. ; done
+
+check test:
+ for d in build-* ; do cd $$d; make check ; cd .. ; done
+
+package:
+ for d in build-* ; do cd $$d; make package ; cd .. ; done
+
+install:
+ for d in build-* ; do cd $$d; make install ; cd .. ; done
+
+############ Internal
+
+build-c:
+ mkdir build-c
+ cd build-c; cmake -G "Unix Makefiles" $(CGREEN_DIR)
+
+build-c++:
+ mkdir build-c++
+ cd build-c++; cmake -G "Unix Makefiles" -DWITH_CXX:bool=ON $(CGREEN_DIR)
+
+.SILENT: