summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-06-26 15:45:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2022-06-27 14:10:19 +0200
commit3d36cdfd6f71b0ed7c152003acf91e8432b78461 (patch)
tree6f30eb2b7f2f25087337f67929394e09b60bc997 /examples
parent2a55edcc40372403fb2de8ed20ed5c44464d416e (diff)
Diffstat (limited to 'examples')
-rw-r--r--examples/ctor.cc96
-rw-r--r--examples/subdir/ctor.cc39
2 files changed, 71 insertions, 64 deletions
diff --git a/examples/ctor.cc b/examples/ctor.cc
index 1a02e90..c41e27c 100644
--- a/examples/ctor.cc
+++ b/examples/ctor.cc
@@ -1,11 +1,11 @@
// -*- c++ -*-
// Distributed under the BSD 2-Clause License.
// See accompanying file LICENSE for details.
-#include "libctor.h"
+#include <libctor.h>
namespace
{
-BuildConfigurations myConfigs()
+BuildConfigurations myConfigs(const Settings&)
{
return
{
@@ -23,39 +23,41 @@ BuildConfigurations myConfigs()
.depends = {
"libplugingui.so",
},
- .cxxflags = {
- "-DUI_X11",
- "-O3",
- "-g",
- "-Wall",
- "-Werror",
- "-std=c++11",
- "-Idrumgizmo/getoptpp",
- "-Idrumgizmo/",
- "-Idrumgizmo/hugin",
- "-Idrumgizmo/plugingui/",
- "-Idrumgizmo/src/",
- "-Idrumgizmo/zita-resampler/libs",
- "-Idrumgizmo/pugixml/src",
+ .flags = {
+ .cxxflags = {
+ "-DUI_X11",
+ "-O3",
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-std=c++11",
+ "-Idrumgizmo/getoptpp",
+ "-Idrumgizmo/",
+ "-Idrumgizmo/hugin",
+ "-Idrumgizmo/plugingui/",
+ "-Idrumgizmo/src/",
+ "-Idrumgizmo/zita-resampler/libs",
+ "-Idrumgizmo/pugixml/src",
+ },
+ .cflags = {
+ "-g",
+ "-O3",
+ "-Wall",
+ "-Werror",
+ },
+ .ldflags = {
+ "-lm",
+ "-lX11",
+ "-lXext",
+ "-lsndfile",
+ "-pthread",
+ },
},
- .cflags = {
- "-g",
- //"-O3",
- "-Wall",
- "-Werror",
- },
- .ldflags = {
- "-lm",
- "-lX11",
- "-lXext",
- "-lsndfile",
- "-pthread",
- }
},
};
}
-BuildConfigurations myConfigs2()
+BuildConfigurations myConfigs2(const Settings&)
{
return
{
@@ -129,23 +131,25 @@ BuildConfigurations myConfigs2()
.depends = {
"src.a",
},
- .cxxflags = {
- "-DUI_X11",
- "-O3",
- "-g",
- "-Wall",
- "-Werror",
- "-std=c++11",
- "-Idrumgizmo/getoptpp",
- "-Idrumgizmo/",
- "-Idrumgizmo/hugin",
- "-Idrumgizmo/plugingui/",
- "-Idrumgizmo/src/",
- "-Idrumgizmo/zita-resampler/libs",
- "-Idrumgizmo/pugixml/src",
+ .flags = {
+ .cxxflags = {
+ "-DUI_X11",
+ "-O3",
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-std=c++11",
+ "-Idrumgizmo/getoptpp",
+ "-Idrumgizmo/",
+ "-Idrumgizmo/hugin",
+ "-Idrumgizmo/plugingui/",
+ "-Idrumgizmo/src/",
+ "-Idrumgizmo/zita-resampler/libs",
+ "-Idrumgizmo/pugixml/src",
+ },
+ .cflags = {},
+ .ldflags = {},
},
- .cflags = {},
- .ldflags = {}
}
};
}
diff --git a/examples/subdir/ctor.cc b/examples/subdir/ctor.cc
index b5f5885..6e28733 100644
--- a/examples/subdir/ctor.cc
+++ b/examples/subdir/ctor.cc
@@ -1,11 +1,11 @@
// -*- c++ -*-
// Distributed under the BSD 2-Clause License.
// See accompanying file LICENSE for details.
-#include "../libctor.h"
+#include <libctor.h>
namespace
{
-BuildConfigurations myConfigs()
+BuildConfigurations myConfigs(const Settings&)
{
return
{
@@ -54,25 +54,28 @@ BuildConfigurations myConfigs()
"../drumgizmo/src/versionstr.cc",
"../drumgizmo/src/zrwrapper.cc",
},
- .cxxflags = {
- "-fPIC",
- "-DUI_X11",
- "-O3",
- "-g",
- "-Wall",
- "-Werror",
- "-std=c++11",
- "-I../drumgizmo/getoptpp",
- "-I../drumgizmo/",
- "-I../drumgizmo/hugin",
- "-I../drumgizmo/plugingui/",
- "-I ../drumgizmo/src/",
- "-I ../drumgizmo/zita-resampler/libs",
- "-I ../drumgizmo/pugixml/src",
+ .flags = {
+ .cxxflags = {
+ "-fPIC",
+ "-DUI_X11",
+ "-O3",
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-std=c++11",
+ "-I../drumgizmo/getoptpp",
+ "-I../drumgizmo/",
+ "-I../drumgizmo/hugin",
+ "-I../drumgizmo/plugingui/",
+ "-I ../drumgizmo/src/",
+ "-I ../drumgizmo/zita-resampler/libs",
+ "-I ../drumgizmo/pugixml/src",
+ },
},
}
};
}
-int a = reg(__FILE__, myConfigs);
}
+
+REG(myConfigs);