summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-09-18 19:20:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-09-18 19:20:10 +0200
commitc9cb81aac55962bd6da36e0e4e23eb9061901a80 (patch)
treece982e70c6bfe2fe55b52b4fe2409164423a8e0e
Skeleton project.
-rw-r--r--AUTHORS0
-rw-r--r--ChangeLog0
-rw-r--r--Makefile.am5
-rw-r--r--NEWS0
-rw-r--r--README0
-rwxr-xr-xautogen.sh15
-rw-r--r--configure.ac62
-rw-r--r--src/Makefile.am38
-rw-r--r--src/simplertp.cc28
-rw-r--r--src/simplertp.qrc5
-rw-r--r--tools/Makefile.am3
-rwxr-xr-xtools/MocList9
-rwxr-xr-xtools/add_file76
13 files changed, 241 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/AUTHORS
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f9a9e9e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+AUTOMAKE_OPTIONS = gnu
+SUBDIRS = src icons tools
+DISTDIRS = src icons tools
+
+EXTRA_DIST =
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/NEWS
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..0b7d48d
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+
+# # Check if hugin has been obtained:
+# if [ ! -d hugin ]
+# then
+# echo "You are missing the hugin submodule."
+# echo "Run"
+# echo " git submodule init"
+# echo " git submodule update"
+# echo "to obtain it."
+# exit 1
+# fi
+
+# Now run autoreconf
+${AUTORECONF:-autoreconf} -fiv
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..10960cb
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,62 @@
+# Filename: configure.in
+
+AC_INIT([simplertp], [1.0.0])
+
+AC_CONFIG_SRCDIR([src/simplertp.cc])
+AM_INIT_AUTOMAKE
+
+AC_PROG_CXX
+#AM_PROG_CC_C_O
+
+AC_PROG_LIBTOOL
+AM_PROG_LIBTOOL
+
+AM_CONFIG_HEADER(config.h)
+AC_STDC_HEADERS
+
+dnl ======================
+dnl Init pkg-config
+dnl ======================
+PKG_PROG_PKG_CONFIG(0.23)
+
+#HUGIN_PARM="-DDISABLE_HUGIN"
+#AC_ARG_WITH(debug, [ --with-debug Build with debug support])
+#if test x$with_debug == xyes; then
+# AC_MSG_WARN([*** Building with debug support!])
+# CXXFLAGS="$CXXFLAGS -Wall -Werror -g"
+# HUGIN_PARM=""
+#fi
+#CXXFLAGS="$CXXFLAGS $HUGIN_PARM"
+
+dnl ======================
+dnl Check for Qt
+dnl ======================
+PKG_CHECK_MODULES(QT, QtCore QtGui QtXml >= 4.5)
+AC_CHECK_PROGS(QT_MOC, [moc4 moc-qt4 moc], [])
+AC_CHECK_PROGS(QT_RCC, [rcc4 rcc-qt4 rcc], [])
+AC_CHECK_PROGS(QT_UIC, [uic4 uic-qt4 uic], [])
+if (test "$QT_MOC" = ""); then
+ AC_MSG_ERROR([QT4 moc is required.])
+fi
+if (test "$QT_RCC" = ""); then
+ AC_MSG_ERROR([QT4 rcc is required.])
+fi
+if (test "$QT_UIC" = ""); then
+ AC_MSG_ERROR([QT4 uic is required.])
+fi
+
+dnl ======================
+dnl Check for libao
+dnl ======================
+PKG_CHECK_MODULES(AO, ao >= 0.8.8)
+
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(LDFLAGS)
+
+
+AC_OUTPUT(
+ Makefile
+ tools/Makefile
+ src/Makefile)
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..4804101
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,38 @@
+bin_PROGRAMS = simplertp
+
+simplertp_LDADD = $(QT_LIBS) $(AO_LIBS) \
+ $(shell ../tools/MocList o ) qrc_simplertp.o
+
+simplertp_CXXFLAGS = $(QT_CFLAGS) $(AO_CFLAGS)
+AM_CXXFLAGS = $(QT_CFLAGS)
+
+simplertp_SOURCES = \
+ simplertp.cc
+
+EXTRA_DIST = \
+ simplertp.qrc
+
+simplertp_MOC = $(shell ../tools/MocList cc )
+
+BUILT_SOURCES = $(simplertp_MOC) qrc_simplertp.cc
+
+CLEANFILES = $(BUILT_SOURCES)
+
+qrc_%.cc: %.qrc
+ rcc $< > $@
+
+%.moc.cc: %.h
+ $(QT_MOC) -o $@ $<
+
+#
+# ui files not used in this project...
+#%.h: %.ui
+# $(QT_UIC) -o $@ $<
+#
+#%.cc: %.ui
+# $(QT_UIC) -o $@ -impl $*.h $<
+
+# command for creating .res file from .rc on Win32
+%.res: %.rc
+ rc $<
+
diff --git a/src/simplertp.cc b/src/simplertp.cc
new file mode 100644
index 0000000..7d61579
--- /dev/null
+++ b/src/simplertp.cc
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/***************************************************************************
+ * simplertp.cc
+ *
+ * Thu Sep 18 19:07:25 CEST 2014
+ * Copyright 2014 Bent Bisballe Nyeng
+ * deva@aasimon.org
+ ****************************************************************************/
+
+/*
+ * This file is part of SimpleRTP.
+ *
+ * SimpleRTP 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.
+ *
+ * SimpleRTP 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 SimpleRTP; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+
diff --git a/src/simplertp.qrc b/src/simplertp.qrc
new file mode 100644
index 0000000..ca52ef2
--- /dev/null
+++ b/src/simplertp.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+<qresource>
+</qresource>
+</RCC>
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 0000000..dc25608
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1,3 @@
+EXTRA_DIST = \
+ MocList \
+ add_file \ No newline at end of file
diff --git a/tools/MocList b/tools/MocList
new file mode 100755
index 0000000..639b668
--- /dev/null
+++ b/tools/MocList
@@ -0,0 +1,9 @@
+# -*- mode: shell-script; sh-shell: bash; sh-indentation: 2 -*-
+if [ "$1" = "cc" ]; then
+ grep "Q_OBJECT" *.h | cut -d: -f1 | sed -e 's/^//g;s/\.h/\.moc.cc/g'| xargs echo;
+elif [ "$1" = "o" ]; then
+ grep "Q_OBJECT" *.h | cut -d: -f1 | sed -e 's/^//g;s/\.h/\.moc.o/g'| xargs echo;
+elif [ "$1" = "h" ]; then
+ grep "Q_OBJECT" *.h | cut -d: -f1 | cut -d'/' -f3 | xargs echo;
+fi
+
diff --git a/tools/add_file b/tools/add_file
new file mode 100755
index 0000000..e9f4b0d
--- /dev/null
+++ b/tools/add_file
@@ -0,0 +1,76 @@
+#!/bin/bash
+PROJECT="SimpleRTP"
+
+function allfile() {
+ echo "/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */" > $1;
+ echo "/***************************************************************************" >> $1;
+ echo " * $1" >> $1;
+ echo " *" >> $1 ;
+ echo " * `date`" >> $1;
+ echo -n " * Copyright " >> $1
+ echo -n `date +%Y | xargs` >> $1
+ if [ "$USER" == "nemo" ];
+ then
+ echo " Jonas Suhr Christensen" >> $1;
+ echo " * jsc@umbraculum.org" >> $1;
+ fi
+ if [ "$USER" == "deva" ];
+ then
+ echo " Bent Bisballe Nyeng" >> $1;
+ echo " * deva@aasimon.org" >> $1;
+ fi
+ if [ "$USER" == "senator" ];
+ then
+ echo " Lars Bisballe Jensen" >> $1;
+ echo " * elsenator@gmail.com" >> $1;
+ fi
+ echo " ****************************************************************************/" >> $1;
+ echo "" >> $1;
+ echo "/*" >> $1;
+ echo " * This file is part of $PROJECT." >> $1;
+ echo " *" >> $1;
+ echo " * $PROJECT is free software; you can redistribute it and/or modify" >> $1;
+ echo " * it under the terms of the GNU General Public License as published by" >> $1;
+ echo " * the Free Software Foundation; either version 2 of the License, or" >> $1;
+ echo " * (at your option) any later version." >> $1;
+ echo " *" >> $1;
+ echo " * $PROJECT is distributed in the hope that it will be useful," >> $1;
+ echo " * but WITHOUT ANY WARRANTY; without even the implied warranty of" >> $1;
+ echo " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" >> $1;
+ echo " * GNU General Public License for more details." >> $1;
+ echo " *" >> $1;
+ echo " * You should have received a copy of the GNU General Public License" >> $1;
+ echo " * along with $PROJECT; if not, write to the Free Software" >> $1;
+ echo " * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA." >> $1;
+ echo " */" >> $1;
+}
+
+function ccfile() {
+ local hf=`echo -n $1 | cut -d'.' -f1`.h;
+ hfile $hf;
+
+ allfile $1;
+ echo -n '#include "' >> $1;
+ echo -n $hf >> $1;
+ echo '"' >> $1;
+ echo '' >> $1;
+}
+
+function hfile() {
+ allfile $1;
+ local hn=`echo $1 | tr 'a-z.' 'A-Z_'`
+ local pr=`echo $PROJECT | tr 'a-z.' 'A-Z_'`
+ echo "#ifndef __${pr}_${hn}__" >> $1;
+ echo "#define __${pr}_${hn}__" >> $1;
+ echo "#endif/*__${pr}_${hn}__*/" >> $1;
+}
+
+if [ "$#" = "1" ]; then
+if [ "CC" = `echo $1 | cut -d'.' -f2 | tr 'a-z' 'A-Z'` ]; then
+ ccfile $1;
+fi;
+if [ "H" = `echo $1 | cut -d'.' -f2 | tr 'a-z' 'A-Z'` ]; then
+ hfile $1;
+fi;
+else echo "Usage: $0 filename";
+fi;