Add example

This commit is contained in:
Christophe de Dinechin 2017-03-26 00:02:34 +01:00
parent 1c3c0e606c
commit e4aec45c89
2 changed files with 47 additions and 0 deletions

41
Makefile Normal file
View File

@ -0,0 +1,41 @@
#******************************************************************************
# Makefile<build> 'build' project
#******************************************************************************
#
# File Description:
#
# A sample maefile for 'build'
#
#
#
#
#
#
#
#
#******************************************************************************
# (C) 2017 Christophe de Dinechin <christophe@dinechin.org>
# 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

6
hello.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main()
{
std::cout << "You successfully built using build\n";
}