some cleanup. Set Version=3+alpha.01, add a helloworld-main to make it compile

This commit is contained in:
Fischlurch 2007-07-03 00:13:12 +02:00
parent c79d3c906a
commit 0a9c2599dd
5 changed files with 64 additions and 19 deletions

15
.gitignore vendored
View file

@ -1,12 +1,9 @@
/wiki/backups/*
*~
a.out
semantic.cache
aclocal.m4
Makefile
Makefile.in
autom4te*
config.*
configure
*.tar.*
build/*
.sconf_temp
.sconf_temp/*
.sconsign.dblite
Buildhelper.pyc
optcache

View file

@ -2,7 +2,6 @@
##
## Buildhelper.py - helpers, custom builders, for SConstruct
##
from fnmatch import fnmatch
# Copyright (C) CinelerraCV
# 2007, Hermann Vosseler <Ichthyostega@web.de>
@ -29,6 +28,7 @@ import re
import tarfile
#
# Common Helper Functions
#
@ -136,7 +136,7 @@ def getTarName(location, defaultName):
if not os.path.isdir(head):
print 'Target dir "%s" for Tar doesn\'t exist.' % head
Exit(1)
mat = re.match(r'([\w\.\-])\.((tar)|(tar\.gz)|(tgz))', tail)
mat = re.match(r'([\w\.\-\+:\~]+)\.((tar)|(tar\.gz)|(tgz))', tail)
if mat:
name = mat.group(1)
ext = '.'+mat.group(2)

View file

@ -22,7 +22,6 @@
#####################################################################
import os
from Buildhelper import *
#-----------------------------------Configuration
@ -30,9 +29,13 @@ OPTIONSCACHEFILE = 'optcache'
CUSTOPTIONSFILE = 'custom-options'
SRCDIR = 'src'
BINDIR = 'src/bin'
VERSION = '3.alpha.1'
VERSION = '3+alpha.01'
#-----------------------------------Configuration
# NOTE: scons -h for help.
# Read more about the SCons build system at: http://www.scons.org
# Basically, this script just /defines/ the components and how they
# fit together. SCons will derive the necessary build steps.
@ -42,6 +45,9 @@ VERSION = '3.alpha.1'
def setupBasicEnvironment():
''' define cmdline options, build type decisions
'''
EnsurePythonVersion(2,3)
EnsureSConsVersion(0,96,90)
opts = defineCmdlineOptions()
env = Environment(options=opts)
@ -61,11 +67,11 @@ def setupBasicEnvironment():
def appendCppDefine(env,var,cppVar):
if env[var]:
env.Append(CPPDEFINES={cppVar: env[var]})
env.Append(CPPDEFINES = {cppVar: env[var]})
def appendVal(env,var,targetVar,val=None):
if env[var]:
env.Append(**{targetVar: val or env[var]})
env.Append( **{targetVar: val or env[var]})
@ -156,7 +162,8 @@ def definePackagingTargets(env, artifacts):
def defineBuildTargets(env, artifacts):
''' define the source file/dirs comprising each artifact to be built.
setup sub-environments with special build options if necessary
setup sub-environments with special build options if necessary.
We use a custom function to declare a whole tree of srcfiles.
'''
cinobj = ( srcSubtree(env,'backend')
+ srcSubtree(env,'proc')
@ -167,7 +174,7 @@ def defineBuildTargets(env, artifacts):
artifacts['cinelerra'] = env.Program('$BINDIR/cinelerra', cinobj)
artifacts['plugins'] = env.SharedLibrary('$BINDIR/cinelerra-plugin', plugobj)
# call subdir SConscript(s)
# call subdir SConscript(s) for independent components
SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts')
@ -197,8 +204,6 @@ def defineInstallTargets(env, artifacts):
### === MAIN === ####################################################
# NOTE: the following code /defines/ what and how to build
# it doesn't "do" the build. SCons will do the "doing"
env = setupBasicEnvironment()

31
src/main.cpp Normal file
View file

@ -0,0 +1,31 @@
/*
main.cpp - start the Cinelerra Application
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
Hermann Vosseler <Ichthyostega@web.de>
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.
*/
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("hello cinelerra again\n");
return 0;
}

12
src/plugin/helloplugin.c Normal file
View file

@ -0,0 +1,12 @@
/*
* hello.c - demonstrates how to build a standalone tool (C source)
* integrated into the SCons based build system of Cinelerra
*/
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("hello cinelerra world");
return 0;
}