aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjames <>2008-02-03 16:20:24 +0000
committerjames <>2008-02-03 16:20:24 +0000
commit4163308ecae26c76d22e4cc80d8bae729b06b94f (patch)
tree5d72762d62aaf3e8843123a967280623e3bd0f64 /src
downloadsympathy-4163308ecae26c76d22e4cc80d8bae729b06b94f.tar.gz
sympathy-4163308ecae26c76d22e4cc80d8bae729b06b94f.tar.bz2
sympathy-4163308ecae26c76d22e4cc80d8bae729b06b94f.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am69
-rw-r--r--src/libsympathy.c20
-rw-r--r--src/project.h65
-rw-r--r--src/prototypes.h0
-rw-r--r--src/sympathy.h.in56
-rw-r--r--src/version.c25
6 files changed, 235 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..b740cf3
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,69 @@
+#
+#
+# Makefile.am:
+#
+# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+# All rights reserved.
+#
+# $Id$
+#
+# $Log$
+# Revision 1.1 2008/02/03 16:20:24 james
+# *** empty log message ***
+#
+#
+#
+#
+
+INCLUDES =
+
+SRCS= libsympathy.c version.c
+CPROTO=cproto
+
+SYMPATHYSRCS=${SRCS}
+
+noinst_HEADERS= project.h prototypes.h
+
+
+libsympathy_a_SOURCES = ${SYMPATHYSRCS}
+libsympathy_la_SOURCES = ${SYMPATHYSRCS}
+
+libsympathy_a_CFLAGS = ${AM_CFLAGS}
+
+BUILT_SOURCES = version.h
+
+lib_LIBRARIES=libsympathy.a
+lib_LTLIBRARIES=libsympathy.la
+
+include_HEADERS=sympathy.h
+
+AM_CFLAGS=-g
+
+libsympathy_la_LDFLAGS = \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -release $(LT_RELEASE) \
+ -export-dynamic
+
+VFD=${srcdir}/..
+VF=${shell cat ${VFD}/version-files}
+VFS=${VF:%=${VFD}/%}
+VCHK=${shell cat ${VFS} | @MD5SUM@ | @AWK@ '{print $$1 }' }
+VNUM=${shell @GREP@ ${VCHK} ${VFD}/version-md5sums | @AWK@ '{ print $$2 }' }
+VDEF=${shell echo `cat ${VFD}/version-major`.`cat ${VFD}/version-minor`.`cat ${VFD}/version-micro` }
+
+protos:
+ echo > prototypes.h
+ ${CPROTO} -v ${INCLUDES} ${SRCS} > prototypes.tmp
+ mv -f prototypes.tmp prototypes.h
+
+version.h: $(VFD)/version-files $(VFD)/version-major \
+ $(VFD)/version-minor $(VFD)/version-micro \
+ $(VFD)/version-md5sums ${VFS} Makefile
+ if [ .${VNUM} = . ]; then \
+ echo "#define VERSION \"libsympathy Version ${VDEF} + Edits\"" > version.h; \
+ echo ${VDEF}-E > version-num; \
+ else \
+ echo "#define VERSION \"libsympathy Version ${VNUM}\"" > version.h; \
+ echo ${VNUM} > version-num; \
+ fi
+
diff --git a/src/libsympathy.c b/src/libsympathy.c
new file mode 100644
index 0000000..40f8a9d
--- /dev/null
+++ b/src/libsympathy.c
@@ -0,0 +1,20 @@
+/*
+ * libsympathy.c:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1 2008/02/03 16:20:24 james
+ * *** empty log message ***
+ *
+ *
+ */
+
+#include "project.h"
+
diff --git a/src/project.h b/src/project.h
new file mode 100644
index 0000000..079f38a
--- /dev/null
+++ b/src/project.h
@@ -0,0 +1,65 @@
+/*
+ * project.h:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * $Log$
+ * Revision 1.1 2008/02/03 16:20:24 james
+ * *** empty log message ***
+ *
+ *
+ */
+
+#ifndef __PROJECT_H__
+#define __PROJECT_H__
+
+#include "config.h"
+
+#ifdef TM_IN_SYS_TIME
+#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+#else
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#endif
+#include <time.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if defined(HAVE_STDINT_H)
+#include <stdint.h>
+#elif defined(HAVE_SYS_INT_TYPES_H)
+#include <sys/int_types.h>
+#endif
+
+#include "prototypes.h"
+
+#endif /* __PROJECT_H__ */
diff --git a/src/prototypes.h b/src/prototypes.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/prototypes.h
diff --git a/src/sympathy.h.in b/src/sympathy.h.in
new file mode 100644
index 0000000..ea79d89
--- /dev/null
+++ b/src/sympathy.h.in
@@ -0,0 +1,56 @@
+/*
+ * sympathy.h.in:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * $Log$
+ * Revision 1.1 2008/02/03 16:20:24 james
+ * *** empty log message ***
+ *
+ *
+ */
+
+/* MAKE ABSOLUTELY SURE THAT YOU ARE EDITING THE sympathy.h.in */
+/* FILE FROM WHICH THIS IS GENERATED - OTHERWISE YOUR EDITS */
+/* WILL BE LOST */
+
+#ifndef __SYMPATHY_H__
+#define __SYMPATHY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+/*the integer constants here are set by configure*/
+
+/*get uint32_t and friends defined */
+#if @G2_HAVE_STDINT_H@
+#include <stdint.h>
+#elif @G2_HAVE_SYS_INT_TYPES_H@
+#include <sys/int_types.h>
+#endif
+#if @G2_HAVE_UNISTD_H@
+#include <unistd.h>
+#endif
+
+/* If the following is <> then configure failed to find where */
+/* struct tm was defined - report it as a bug */
+
+/*get struct tm defined*/
+#include <@G2_TM_H@>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __SYMPATHY_H__ */
diff --git a/src/version.c b/src/version.c
new file mode 100644
index 0000000..244ade0
--- /dev/null
+++ b/src/version.c
@@ -0,0 +1,25 @@
+/*
+ * version.c:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1 2008/02/03 16:20:24 james
+ * *** empty log message ***
+ *
+ *
+ */
+
+#include "version.h"
+
+static char *
+GetVersion(void)
+{
+ return VERSION;
+}