diff options
Diffstat (limited to 'hello')
-rw-r--r-- | hello/buildfile | 8 | ||||
-rw-r--r-- | hello/hello | 11 | ||||
-rw-r--r-- | hello/hello.cxx | 16 |
3 files changed, 35 insertions, 0 deletions
diff --git a/hello/buildfile b/hello/buildfile new file mode 100644 index 0000000..4903a33 --- /dev/null +++ b/hello/buildfile @@ -0,0 +1,8 @@ +lib{hello}: {hxx cxx}{hello} + +cxx.poptions += -I$src_root +lib{hello}: cxx.export.poptions = -I$src_root + +# Install into the hello/ subdirectory of, say, /usr/include/. +# +install.include = $install.include/hello diff --git a/hello/hello b/hello/hello new file mode 100644 index 0000000..4f85114 --- /dev/null +++ b/hello/hello @@ -0,0 +1,11 @@ +// file: hello/hello -*- C++ -*- + +#pragma once + +#include <string> + +namespace hello +{ + void + say (const std::string& name); +} diff --git a/hello/hello.cxx b/hello/hello.cxx new file mode 100644 index 0000000..65d0aa7 --- /dev/null +++ b/hello/hello.cxx @@ -0,0 +1,16 @@ +// file: hello/hello.cxx -*- C++ -*- + +#include <hello/hello> + +#include <iostream> + +using namespace std; + +namespace hello +{ + void + say (const string& n) + { + cout << "Hello, " << n << '!' << endl; + } +} |