lumiera is alive...
This starts the proposed changes in http://www.pipapo.org/pipawiki/Lumiera/DesignProcess/ApplicationStructure * Moving all necessary files from src/backend to src/lumiera * create a small helloworld main app * setup the buildsystem to build it all * fix include paths at many places The testsuite is not yet fixed here, that will be the next commit
This commit is contained in:
parent
865398e59c
commit
52a9c7fb27
25 changed files with 223 additions and 52 deletions
|
|
@ -47,6 +47,7 @@ include $(top_srcdir)/src/proc/Makefile.am
|
|||
include $(top_srcdir)/src/common/Makefile.am
|
||||
include $(top_srcdir)/src/lib/Makefile.am
|
||||
include $(top_srcdir)/src/backend/Makefile.am
|
||||
include $(top_srcdir)/src/lumiera/Makefile.am
|
||||
|
||||
# tools
|
||||
include $(top_srcdir)/src/tool/Makefile.am
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
liblumibackend_a_srcdir = $(top_srcdir)/src/backend
|
||||
noinst_LIBRARIES += liblumibackend.a
|
||||
|
||||
liblumibackend_a_CPPFLAGS = $(AM_CPPFLAGS) -DLUMIERA_PLUGIN_PATH="\"$(pkglibdir)\""
|
||||
liblumibackend_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
liblumibackend_a_CFLAGS = $(AM_CFLAGS) -std=gnu99 -Wextra -Wall -Werror
|
||||
|
||||
liblumibackend_a_SOURCES = \
|
||||
|
|
@ -27,21 +27,11 @@ liblumibackend_a_SOURCES = \
|
|||
$(liblumibackend_a_srcdir)/file.c \
|
||||
$(liblumibackend_a_srcdir)/filehandle.c \
|
||||
$(liblumibackend_a_srcdir)/filedescriptor.c \
|
||||
$(liblumibackend_a_srcdir)/filehandlecache.c \
|
||||
$(liblumibackend_a_srcdir)/interface.c \
|
||||
$(liblumibackend_a_srcdir)/interfaceregistry.c \
|
||||
$(liblumibackend_a_srcdir)/plugin.c \
|
||||
$(liblumibackend_a_srcdir)/plugin_dynlib.c \
|
||||
$(liblumibackend_a_srcdir)/config.c \
|
||||
$(liblumibackend_a_srcdir)/config_typed.c \
|
||||
$(liblumibackend_a_srcdir)/config_wordlist.c \
|
||||
$(liblumibackend_a_srcdir)/configentry.c \
|
||||
$(liblumibackend_a_srcdir)/configitem.c \
|
||||
$(liblumibackend_a_srcdir)/config_lookup.c \
|
||||
$(liblumibackend_a_srcdir)/resourcecollector.c \
|
||||
$(liblumibackend_a_srcdir)/mmap.c \
|
||||
$(liblumibackend_a_srcdir)/mmapings.c \
|
||||
$(liblumibackend_a_srcdir)/mmapcache.c
|
||||
$(liblumibackend_a_srcdir)/mmapcache.c \
|
||||
$(liblumibackend_a_srcdir)/filehandlecache.c
|
||||
|
||||
noinst_HEADERS += \
|
||||
$(liblumibackend_a_srcdir)/mediaaccessfacade.cpp \
|
||||
|
|
@ -50,14 +40,6 @@ noinst_HEADERS += \
|
|||
$(liblumibackend_a_srcdir)/filehandle.h \
|
||||
$(liblumibackend_a_srcdir)/filedescriptor.h \
|
||||
$(liblumibackend_a_srcdir)/filehandlecache.h \
|
||||
$(liblumibackend_a_srcdir)/interface.h \
|
||||
$(liblumibackend_a_srcdir)/interfaceregistry.h \
|
||||
$(liblumibackend_a_srcdir)/interfacedescriptor.h \
|
||||
$(liblumibackend_a_srcdir)/plugin.h \
|
||||
$(liblumibackend_a_srcdir)/config.h \
|
||||
$(liblumibackend_a_srcdir)/configentry.h \
|
||||
$(liblumibackend_a_srcdir)/configitem.h \
|
||||
$(liblumibackend_a_srcdir)/config_lookup.h \
|
||||
$(liblumibackend_a_srcdir)/resourcecollector.h \
|
||||
$(liblumibackend_a_srcdir)/mmap.h \
|
||||
$(liblumibackend_a_srcdir)/mmapings.h \
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "model/project.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "backend/interface.h"
|
||||
#include "lumiera/interface.h"
|
||||
}
|
||||
|
||||
NOBUG_CPP_DEFINE_FLAG(gui);
|
||||
|
|
|
|||
7
src/lumiera/DIR_INFO
Normal file
7
src/lumiera/DIR_INFO
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
The main application shell
|
||||
|
||||
contains:
|
||||
* the config system
|
||||
* commandline parsing
|
||||
* interfaces and plugin loading
|
||||
* lua interpreter (planned)
|
||||
48
src/lumiera/Makefile.am
Normal file
48
src/lumiera/Makefile.am
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Copyright (C) Lumiera.org
|
||||
# 2008, Christian Thaeter <ct@pipapo.org>
|
||||
#
|
||||
# This program 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 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
lumiera_srcdir = $(top_srcdir)/src/lumiera
|
||||
bin_PROGRAMS += lumiera
|
||||
|
||||
lumiera_CPPFLAGS = $(AM_CPPFLAGS) -DLUMIERA_PLUGIN_PATH="\"$(pkglibdir)\""
|
||||
lumiera_CFLAGS = $(AM_CFLAGS) -std=gnu99 -Wextra -Wall -Werror
|
||||
lumiera_LDADD = liblumiera.a $(LUMIERA_PLUGIN_LIBS) $(NOBUGMT_LUMIERA_LIBS)
|
||||
|
||||
lumiera_SOURCES = \
|
||||
$(lumiera_srcdir)/lumiera.c \
|
||||
$(lumiera_srcdir)/interface.c \
|
||||
$(lumiera_srcdir)/interfaceregistry.c \
|
||||
$(lumiera_srcdir)/plugin.c \
|
||||
$(lumiera_srcdir)/plugin_dynlib.c \
|
||||
$(lumiera_srcdir)/config.c \
|
||||
$(lumiera_srcdir)/config_typed.c \
|
||||
$(lumiera_srcdir)/config_wordlist.c \
|
||||
$(lumiera_srcdir)/configentry.c \
|
||||
$(lumiera_srcdir)/configitem.c \
|
||||
$(lumiera_srcdir)/config_lookup.c
|
||||
|
||||
|
||||
noinst_HEADERS += \
|
||||
$(lumiera_srcdir)/interface.h \
|
||||
$(lumiera_srcdir)/interfaceregistry.h \
|
||||
$(lumiera_srcdir)/interfacedescriptor.h \
|
||||
$(lumiera_srcdir)/plugin.h \
|
||||
$(lumiera_srcdir)/config.h \
|
||||
$(lumiera_srcdir)/configentry.h \
|
||||
$(lumiera_srcdir)/configitem.h \
|
||||
$(lumiera_srcdir)/config_lookup.h \
|
||||
$(lumiera_srcdir)/lumiera.h
|
||||
|
|
@ -24,7 +24,8 @@
|
|||
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "backend/config.h"
|
||||
#include "lumiera/lumiera.h"
|
||||
#include "lumiera/config.h"
|
||||
|
||||
//TODO: internal/static forward declarations//
|
||||
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
NOBUG_DEFINE_FLAG_PARENT (config_all, backend);
|
||||
NOBUG_DEFINE_FLAG_PARENT (config_all, lumiera_all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (config, config_all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (config_typed, config_all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (config_file, config_all);
|
||||
|
|
@ -193,7 +194,7 @@ lumiera_config_get (const char* key, const char** value)
|
|||
{
|
||||
char* env = lumiera_tmpbuf_snprintf (2048, "LUMIERA_%s", tr_key);
|
||||
|
||||
*value = getenv(env);
|
||||
*value = getenv (env);
|
||||
if (*value)
|
||||
{
|
||||
NOTICE (config, "envvar override for config %s = %s", env, *value);
|
||||
|
|
@ -51,8 +51,8 @@ LUMIERA_ERROR_DECLARE (CONFIG_NO_ENTRY);
|
|||
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "backend/config_lookup.h"
|
||||
#include "backend/configitem.h"
|
||||
#include "lumiera/config_lookup.h"
|
||||
#include "lumiera/configitem.h"
|
||||
|
||||
//TODO: System includes//
|
||||
#include <nobug.h>
|
||||
|
|
@ -20,8 +20,8 @@
|
|||
*/
|
||||
#include "lib/safeclib.h"
|
||||
|
||||
#include "backend/config_lookup.h"
|
||||
#include "backend/config.h"
|
||||
#include "lumiera/config_lookup.h"
|
||||
#include "lumiera/config.h"
|
||||
|
||||
/* we only use one fatal error for now, when allocation in the config system fail, something else is pretty wrong */
|
||||
LUMIERA_ERROR_DEFINE (CONFIG_LOOKUP, "config lookup failure");
|
||||
|
|
@ -33,7 +33,7 @@ typedef struct lumiera_config_lookupentry_struct lumiera_config_lookupentry;
|
|||
typedef lumiera_config_lookupentry* LumieraConfigLookupentry;
|
||||
|
||||
|
||||
#include "backend/configitem.h"
|
||||
#include "lumiera/configitem.h"
|
||||
|
||||
|
||||
#include <nobug.h>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "backend/config.h"
|
||||
#include "lumiera/config.h"
|
||||
|
||||
//TODO: internal/static forward declarations//
|
||||
extern LumieraConfig lumiera_global_config;
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include "lib/safeclib.h"
|
||||
|
||||
|
||||
#include "backend/config.h"
|
||||
#include "lumiera/config.h"
|
||||
|
||||
extern LumieraConfig lumiera_global_config;
|
||||
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include "lib/safeclib.h"
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "backend/configentry.h"
|
||||
#include "lumiera/configentry.h"
|
||||
|
||||
//TODO: internal/static forward declarations//
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ typedef lumiera_configentry* LumieraConfigentry;
|
|||
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "backend/configitem.h"
|
||||
#include "lumiera/configitem.h"
|
||||
|
||||
//TODO: System includes//
|
||||
#include <nobug.h>
|
||||
|
|
@ -24,9 +24,10 @@
|
|||
#include "lib/safeclib.h"
|
||||
|
||||
|
||||
#include "backend/config.h"
|
||||
#include "backend/configitem.h"
|
||||
#include "backend/configentry.h"
|
||||
//TODO: Lumiera header includes//
|
||||
#include "lumiera/config.h"
|
||||
#include "lumiera/configitem.h"
|
||||
#include "lumiera/configentry.h"
|
||||
|
||||
|
||||
static LumieraConfigitem parse_directive (LumieraConfigitem self, char* itr);
|
||||
|
|
@ -33,7 +33,7 @@ typedef lumiera_configitem* LumieraConfigitem;
|
|||
struct lumiera_configitem_vtable;
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "backend/config_lookup.h"
|
||||
#include "lumiera/config_lookup.h"
|
||||
|
||||
|
||||
//TODO: System includes//
|
||||
|
|
@ -22,10 +22,10 @@
|
|||
#include "lib/mutex.h"
|
||||
#include "lib/safeclib.h"
|
||||
|
||||
#include "backend/plugin.h"
|
||||
#include "backend/interface.h"
|
||||
#include "lumiera/plugin.h"
|
||||
#include "lumiera/interface.h"
|
||||
|
||||
#include "backend/interfaceregistry.h"
|
||||
#include "lumiera/interfaceregistry.h"
|
||||
|
||||
#include <nobug.h>
|
||||
|
||||
|
|
@ -407,7 +407,6 @@ LUMIERA_INTERFACE_DECLARE (lumieraorg__plugin, 0,
|
|||
API to handle interfaces
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Open an interface by version and name.
|
||||
* Looks up the requested interface, possibly loading it from a plugin.
|
||||
|
|
@ -29,8 +29,9 @@
|
|||
|
||||
|
||||
|
||||
#include "backend/plugin.h"
|
||||
#include "backend/interfaceregistry.h"
|
||||
#include "lumiera/lumiera.h"
|
||||
#include "lumiera/plugin.h"
|
||||
#include "lumiera/interfaceregistry.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
* by their name and major version.
|
||||
*/
|
||||
|
||||
NOBUG_DEFINE_FLAG_PARENT (interface_all, backend);
|
||||
NOBUG_DEFINE_FLAG_PARENT (interface_all, lumiera_all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (plugin, interface_all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (interfaceregistry, interface_all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (interface, interface_all);
|
||||
|
|
@ -24,8 +24,8 @@
|
|||
#include "lib/mutex.h"
|
||||
#include "lib/psplay.h"
|
||||
|
||||
#include "backend/interface.h"
|
||||
#include "backend/plugin.h"
|
||||
#include "lumiera/interface.h"
|
||||
#include "lumiera/plugin.h"
|
||||
|
||||
#include <nobug.h>
|
||||
|
||||
74
src/lumiera/lumiera.c
Normal file
74
src/lumiera/lumiera.c
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
lumiera.c - Lumiera main application shell
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
||||
This program 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 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
//TODO: Support library includes//
|
||||
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
#include "lumiera/lumiera.h"
|
||||
|
||||
//TODO: internal/static forward declarations//
|
||||
|
||||
|
||||
//TODO: System includes//
|
||||
#include <stdio.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
*/
|
||||
|
||||
NOBUG_DEFINE_FLAG (all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (lumiera_all, all);
|
||||
NOBUG_DEFINE_FLAG_PARENT (lumiera, lumiera_all);
|
||||
|
||||
|
||||
//code goes here//
|
||||
|
||||
static void
|
||||
lumiera_init (void)
|
||||
{
|
||||
NOBUG_INIT;
|
||||
NOBUG_INIT_FLAG (all);
|
||||
NOBUG_INIT_FLAG (lumiera_all);
|
||||
NOBUG_INIT_FLAG (lumiera);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char** argv)
|
||||
{
|
||||
lumiera_init ();
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
printf ("Lumiera is alive ...\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Local Variables:
|
||||
// mode: C
|
||||
// c-file-style: "gnu"
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
*/
|
||||
57
src/lumiera/lumiera.h
Normal file
57
src/lumiera/lumiera.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
lumiera.h - Lumiera main application shell
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
||||
This program 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 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef LUMIERA_LUMIERA_H
|
||||
#define LUMIERA_LUMIERA_H
|
||||
|
||||
//TODO: Support library includes//
|
||||
|
||||
|
||||
//TODO: Forward declarations//
|
||||
|
||||
|
||||
//TODO: Lumiera header includes//
|
||||
|
||||
|
||||
//TODO: System includes//
|
||||
#include <nobug.h>
|
||||
|
||||
NOBUG_DECLARE_FLAG (all);
|
||||
NOBUG_DECLARE_FLAG (lumiera_all);
|
||||
NOBUG_DECLARE_FLAG (lumiera);
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
*/
|
||||
|
||||
//TODO: declarations go here//
|
||||
|
||||
|
||||
#endif
|
||||
/*
|
||||
// Local Variables:
|
||||
// mode: C
|
||||
// c-file-style: "gnu"
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
*/
|
||||
|
|
@ -25,9 +25,9 @@
|
|||
#include "lib/mutex.h"
|
||||
#include "lib/error.h"
|
||||
|
||||
#include "backend/interfaceregistry.h"
|
||||
#include "backend/config.h"
|
||||
#include "backend/plugin.h"
|
||||
#include "lumiera/interfaceregistry.h"
|
||||
#include "lumiera/config.h"
|
||||
#include "lumiera/plugin.h"
|
||||
|
||||
#include <glob.h>
|
||||
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
#include "lib/psplay.h"
|
||||
#include "lib/error.h"
|
||||
|
||||
#include "backend/interface.h"
|
||||
#include "lumiera/interface.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <nobug.h>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include "backend/plugin.h"
|
||||
#include "lumiera/plugin.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <nobug.h>
|
||||
Loading…
Reference in a new issue