From 65189a55759010586a812200d693c9e1cdb43b34 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Sat, 2 May 2020 22:55:10 +0200 Subject: [PATCH] Move files around Sample main.cpp is now into examples/greet --- examples/dieroll/main.cpp | 17 +++++++++++++++++ {src => examples/greet}/main.cpp | 0 examples/greet/meson.build | 5 +++++ examples/meson.build | 1 + meson.build | 20 +++++++------------- src/{wren => }/configuration.cpp | 0 src/{wren => }/def_configuration.cpp | 0 src/{wren => }/dynafunc_amd64_gnu.S | 0 src/{wren => }/dynafunc_maker.cpp | 0 src/{wren => }/dynafunc_maker.hpp | 0 src/{wren => }/handle.cpp | 0 src/{wren => }/vm.cpp | 0 src/{wren => }/vm_fun.cpp | 0 13 files changed, 30 insertions(+), 13 deletions(-) rename {src => examples/greet}/main.cpp (100%) create mode 100644 examples/greet/meson.build rename src/{wren => }/configuration.cpp (100%) rename src/{wren => }/def_configuration.cpp (100%) rename src/{wren => }/dynafunc_amd64_gnu.S (100%) rename src/{wren => }/dynafunc_maker.cpp (100%) rename src/{wren => }/dynafunc_maker.hpp (100%) rename src/{wren => }/handle.cpp (100%) rename src/{wren => }/vm.cpp (100%) rename src/{wren => }/vm_fun.cpp (100%) diff --git a/examples/dieroll/main.cpp b/examples/dieroll/main.cpp index ff4ad4e..d0396be 100644 --- a/examples/dieroll/main.cpp +++ b/examples/dieroll/main.cpp @@ -1,3 +1,20 @@ +/* Copyright 2020, Michele Santullo + * This file is part of wrenpp. + * + * Wrenpp is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Wrenpp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with wrenpp. If not, see . + */ + #include "wrenpp/vm_fun.hpp" #include "wrenpp/def_configuration.hpp" #include diff --git a/src/main.cpp b/examples/greet/main.cpp similarity index 100% rename from src/main.cpp rename to examples/greet/main.cpp diff --git a/examples/greet/meson.build b/examples/greet/meson.build new file mode 100644 index 0000000..e752762 --- /dev/null +++ b/examples/greet/meson.build @@ -0,0 +1,5 @@ +executable('greet', + 'main.cpp', + dependencies: wrenpp_dep, + install: false, +) diff --git a/examples/meson.build b/examples/meson.build index 9640f44..1e27a26 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1 +1,2 @@ subdir('dieroll') +subdir('greet') diff --git a/meson.build b/meson.build index 5bcb2d8..f4ad551 100644 --- a/meson.build +++ b/meson.build @@ -49,13 +49,13 @@ project_config_file = configure_file( wrenpp = library(meson.project_name(), project_config_file, - 'src/wren/vm.cpp', - 'src/wren/configuration.cpp', - 'src/wren/def_configuration.cpp', - 'src/wren/dynafunc_maker.cpp', - 'src/wren/dynafunc_' + arch + '_' + os + '.S', - 'src/wren/handle.cpp', - 'src/wren/vm_fun.cpp', + 'src/vm.cpp', + 'src/configuration.cpp', + 'src/def_configuration.cpp', + 'src/dynafunc_maker.cpp', + 'src/dynafunc_' + arch + '_' + os + '.S', + 'src/handle.cpp', + 'src/vm_fun.cpp', dependencies: [wren_dep], include_directories: public_incl, install: true, @@ -66,11 +66,5 @@ wrenpp_dep = declare_dependency( ) if get_option('build_examples') - executable(meson.project_name() + 'sample', - 'src/main.cpp', - dependencies: wrenpp_dep, - install: false, - ) - subdir('examples') endif diff --git a/src/wren/configuration.cpp b/src/configuration.cpp similarity index 100% rename from src/wren/configuration.cpp rename to src/configuration.cpp diff --git a/src/wren/def_configuration.cpp b/src/def_configuration.cpp similarity index 100% rename from src/wren/def_configuration.cpp rename to src/def_configuration.cpp diff --git a/src/wren/dynafunc_amd64_gnu.S b/src/dynafunc_amd64_gnu.S similarity index 100% rename from src/wren/dynafunc_amd64_gnu.S rename to src/dynafunc_amd64_gnu.S diff --git a/src/wren/dynafunc_maker.cpp b/src/dynafunc_maker.cpp similarity index 100% rename from src/wren/dynafunc_maker.cpp rename to src/dynafunc_maker.cpp diff --git a/src/wren/dynafunc_maker.hpp b/src/dynafunc_maker.hpp similarity index 100% rename from src/wren/dynafunc_maker.hpp rename to src/dynafunc_maker.hpp diff --git a/src/wren/handle.cpp b/src/handle.cpp similarity index 100% rename from src/wren/handle.cpp rename to src/handle.cpp diff --git a/src/wren/vm.cpp b/src/vm.cpp similarity index 100% rename from src/wren/vm.cpp rename to src/vm.cpp diff --git a/src/wren/vm_fun.cpp b/src/vm_fun.cpp similarity index 100% rename from src/wren/vm_fun.cpp rename to src/vm_fun.cpp