From e4aec45c89d8ff8d7a4119725797da647829582d Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Sun, 26 Mar 2017 00:02:34 +0100 Subject: [PATCH] Add example --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ hello.cpp | 6 ++++++ 2 files changed, 47 insertions(+) create mode 100644 Makefile create mode 100644 hello.cpp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d8a2abd --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +#****************************************************************************** +# Makefile 'build' project +#****************************************************************************** +# +# File Description: +# +# A sample maefile for 'build' +# +# +# +# +# +# +# +# +#****************************************************************************** +# (C) 2017 Christophe de Dinechin +# This software is licensed under the GNU General Public License v3 +# See file COPYING for details. +#****************************************************************************** + +# Define the path to 'build' (can be a git submodule in your project) +BUILD=./ + +# Define the source code +SOURCES=hello.cpp + +# Define the product of the build (.exe will be removed for Unix builds) +PRODUCTS=hello.exe + +# Define what to test +TESTS=product count-characters + +# Define what to benchmark +BENCHMARKS=product + +# Include the makefile rules +include $(BUILD)rules.mk + +count-characters.runtest: + @echo Output has `$(OBJPRODUCTS) | wc -c` characters, should be 35 diff --git a/hello.cpp b/hello.cpp new file mode 100644 index 0000000..077c28f --- /dev/null +++ b/hello.cpp @@ -0,0 +1,6 @@ +#include + +int main() +{ + std::cout << "You successfully built using build\n"; +}