[complement-svn] SF.net SVN: complement: [1534] trunk/complement/explore/inquiry/shades
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-02-27 10:28:34
|
Revision: 1534 http://svn.sourceforge.net/complement/?rev=1534&view=rev Author: complement Date: 2007-02-27 02:28:33 -0800 (Tue, 27 Feb 2007) Log Message: ----------- autotools sample Added Paths: ----------- trunk/complement/explore/inquiry/shades/autotools/ trunk/complement/explore/inquiry/shades/autotools/Makefile.am trunk/complement/explore/inquiry/shades/autotools/build.sh trunk/complement/explore/inquiry/shades/autotools/configure.ac trunk/complement/explore/inquiry/shades/autotools/main.cc trunk/complement/explore/inquiry/shades/autotools/my.h trunk/complement/explore/inquiry/shades/autotools/other.cc Added: trunk/complement/explore/inquiry/shades/autotools/Makefile.am =================================================================== --- trunk/complement/explore/inquiry/shades/autotools/Makefile.am (rev 0) +++ trunk/complement/explore/inquiry/shades/autotools/Makefile.am 2007-02-27 10:28:33 UTC (rev 1534) @@ -0,0 +1,6 @@ +bin_PROGRAMS = cxxtest + +cxxtest_SOURCES = main.cc +AM_CXXFLAGS = -pthread +AM_CPPFLAGS = -I/usr/include/stlport +cxxtest_LDADD = -lstlport Added: trunk/complement/explore/inquiry/shades/autotools/build.sh =================================================================== --- trunk/complement/explore/inquiry/shades/autotools/build.sh (rev 0) +++ trunk/complement/explore/inquiry/shades/autotools/build.sh 2007-02-27 10:28:33 UTC (rev 1534) @@ -0,0 +1,7 @@ +#!/bin/sh + +c++ -pthread -g -c -I${HOME}/STLport.lab/STLport/stlport -o main.o main.cc +# c++ -pthread -g -c -I${HOME}/STLport.lab/STLport/stlport -o other.o other.cc +gcc -pthread -g -L${HOME}/STLport.lab/STLport/lib -Wl,--rpath=${HOME}/STLport.lab/STLport/lib -o cxxtest main.o -lstlport +# gcc -pthread -g -L${HOME}/STLport.lab/STLport/lib -Wl,--rpath=${HOME}/STLport.lab/STLport/lib -o cxxtest main.o other.o -lstlport +# c++ -pthread -g -I${HOME}/STLport.lab/STLport/stlport -L${HOME}/STLport.lab/STLport/lib -Wl,--rpath=${HOME}/STLport.lab/STLport/lib -o cxxtest main.o other.o -lstlport Property changes on: trunk/complement/explore/inquiry/shades/autotools/build.sh ___________________________________________________________________ Name: svn:executable + * Added: trunk/complement/explore/inquiry/shades/autotools/configure.ac =================================================================== --- trunk/complement/explore/inquiry/shades/autotools/configure.ac (rev 0) +++ trunk/complement/explore/inquiry/shades/autotools/configure.ac 2007-02-27 10:28:33 UTC (rev 1534) @@ -0,0 +1,23 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT(TestCXXProject, 1.0.0) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([main.cc]) +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_FILES([Makefile]) + +# Checks for programs. +AC_PROG_CXX +AC_PROG_LIBTOOL + +# Checks for libraries. +ACX_PTHREAD + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. +AC_OUTPUT Added: trunk/complement/explore/inquiry/shades/autotools/main.cc =================================================================== --- trunk/complement/explore/inquiry/shades/autotools/main.cc (rev 0) +++ trunk/complement/explore/inquiry/shades/autotools/main.cc 2007-02-27 10:28:33 UTC (rev 1534) @@ -0,0 +1,14 @@ +#include <iostream> +// #include "my.h" + +extern int other(); + +int main(void) +{ + // A<int> a; + // a.use_it() += 1; + // int v1 = a.use_it(); + // int v2 = other(); + std::cout << "Hello, world! " << /* v1 << " " << v2 << */ std::endl; + return 0; +} Added: trunk/complement/explore/inquiry/shades/autotools/my.h =================================================================== --- trunk/complement/explore/inquiry/shades/autotools/my.h (rev 0) +++ trunk/complement/explore/inquiry/shades/autotools/my.h 2007-02-27 10:28:33 UTC (rev 1534) @@ -0,0 +1,27 @@ +#ifndef __MY_H +#define __MY_H + +template <class T> +class A +{ + public: + A(); + + T& use_it(); + + private: + static T val; +}; + +template <class T> +A<T>::A() +{ } + +template <class T> +T& A<T>::use_it() +{ return val; } + +template <class T> +T A<T>::val = 0; + +#endif // __MY_H Added: trunk/complement/explore/inquiry/shades/autotools/other.cc =================================================================== --- trunk/complement/explore/inquiry/shades/autotools/other.cc (rev 0) +++ trunk/complement/explore/inquiry/shades/autotools/other.cc 2007-02-27 10:28:33 UTC (rev 1534) @@ -0,0 +1,10 @@ +#include "my.h" + +int other() +{ + A<int> a; + a.use_it() += 1; + + return a.use_it(); +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |