diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ctor.cc | 96 | ||||
-rw-r--r-- | examples/subdir/ctor.cc | 39 |
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); |