Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalLeaves committed Dec 1, 2017
0 parents commit 6b97bd1
Show file tree
Hide file tree
Showing 22 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ignacio Nieto Carvajal <contact@digitalleaves.com>
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0: Initial version
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
AM_CXXFLAGS = -fpic -Wall -Wextra
SUBDIRS = src doc examples man scripts

1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No news...
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the readme file...
6 changes: 6 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

case `uname` in Darwin*) glibtoolize --copy ;;
*) libtoolize --copy ;; esac

aclocal && autoheader && automake --add-missing && autoconf
Empty file added autoscan.log
Empty file.
27 changes: 27 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([helloWorld], [1.0], [contact@digitalleaves.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

# Checks for libraries.
LT_INIT
AC_ENABLE_SHARED
AC_DISABLE_STATIC
AC_PROG_LIBTOOL(libtool)

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T

# Output Makefile files.
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile examples/Makefile man/Makefile scripts/Makefile])
AC_OUTPUT

2 changes: 2 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = README.md changelog
5 changes: 5 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Simple readme for the hello world C++ project example

This is just a dummy file to show how to include custom documentation files in the project.


2 changes: 2 additions & 0 deletions doc/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v1.0: Initial version

2 changes: 2 additions & 0 deletions examples/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exampledir = $(datarootdir)/doc/@PACKAGE@
example_DATA = sample.data
2 changes: 2 additions & 0 deletions examples/sample.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = 1.0
author = Ignacio Nieto Carvajal <contact@digitalleaves.com>
2 changes: 2 additions & 0 deletions man/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
man_MANS = helloWorld.1

15 changes: 15 additions & 0 deletions man/helloWorld.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.\" Manpage for helloWorld.
.\" Contact contact@digitalleaves.com for comments or help.
.TH man 1 "30 Nov 2017" "1.0" "helloWorld man page"
.SH NAME
helloWorld \- simple hello world example application
.SH SYNOPSIS
helloWorld
.SH DESCRIPTION
helloWorld is a simple test application to show how to build a C++ example project with Autotools for multiplatform compilation and use.
.SH OPTIONS
helloWorld does not take any arguments.
.SH BUGS
No known bugs.
.SH AUTHOR
Ignacio Nieto Carvajal (contact@digitalleaves.com)
1 change: 1 addition & 0 deletions scripts/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin_SCRIPTS = helloWorldScript1.sh helloWorldScript2.sh
2 changes: 2 additions & 0 deletions scripts/helloWorldScript1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Hello world!"

2 changes: 2 additions & 0 deletions scripts/helloWorldScript2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Goodbye World!"

10 changes: 10 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = $(ACLOCAL_FLAGS)

bin_PROGRAMS = helloWorld
helloWorld_SOURCES = main.cpp
helloWorld_LDADD = libHelloWorld.la

lib_LTLIBRARIES = libHelloWorld.la
libHelloWorld_la_LDFLAGS = -version-info 0:0:0
libHelloWorld_la_SOURCES = helloWorld.cpp helloWorld.h
7 changes: 7 additions & 0 deletions src/helloWorld.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "helloWorld.h"

namespace helloWorld {
void printHelloWorldMessage() {
std::cout << "Hello world, helloWorld() called in the helloWorld namespace." << std::endl;
}
}
6 changes: 6 additions & 0 deletions src/helloWorld.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <iostream>
#pragma once

namespace helloWorld {
void printHelloWorldMessage();
}
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "helloWorld.h"

int main() {
helloWorld::printHelloWorldMessage();
return 0;
}

0 comments on commit 6b97bd1

Please sign in to comment.