aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorroot <>2009-02-08 16:25:32 +0000
committerroot <>2009-02-08 16:25:32 +0000
commit5d3e093d432a31fb8a8267cbf30f1ed892f49508 (patch)
tree32d9b3010b05d1719301428fd0ab278d3790445b /src
downloadlibjwg-5d3e093d432a31fb8a8267cbf30f1ed892f49508.tar.gz
libjwg-5d3e093d432a31fb8a8267cbf30f1ed892f49508.tar.bz2
libjwg-5d3e093d432a31fb8a8267cbf30f1ed892f49508.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am76
-rw-r--r--src/ext_prototypes.h0
-rw-r--r--src/jwg-head.h.in50
-rw-r--r--src/jwg-tail.h5
-rw-r--r--src/libjwg.c20
-rw-r--r--src/project.h78
-rw-r--r--src/prototypes.h0
-rw-r--r--src/version.c25
8 files changed, 254 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..fb8a416
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,76 @@
+#
+#
+# Makefile.am:
+#
+# Copyright (c) 2009 James McKenzie <20@madingley.org>,
+# All rights reserved.
+#
+# $Id$
+#
+# $Log$
+# Revision 1.1 2009/02/08 16:25:32 root
+# *** empty log message ***
+#
+#
+#
+#
+
+INCLUDES =
+
+SRCS= libjwg.c version.c
+CPROTO=cproto
+
+JWGSRCS=${SRCS}
+
+noinst_HEADERS= project.h prototypes.h jwg-tail.h ext_prototypes.h
+
+libjwg_a_SOURCES = ${JWGSRCS}
+libjwg_la_SOURCES = ${JWGSRCS}
+
+libjwg_a_CFLAGS = ${AM_CFLAGS}
+
+BUILT_SOURCES = version.h jwg.h
+
+lib_LIBRARIES=libjwg.a
+lib_LTLIBRARIES=libjwg.la
+
+include_HEADERS=jwg.h
+
+AM_CFLAGS=-g
+
+libjwg_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` }
+
+
+jwg.h:jwg-head.h ext_prototypes.h jwg-tail.h
+ cat jwg-head.h ext_prototypes.h jwg-tail.h > jwg.h
+
+protos:
+ echo > prototypes.h
+ echo > ext_prototypes.h
+ cat jwg-head.h ext_prototypes.h jwg-tail.h > jwg.h
+ ${CPROTO} -v -DINT_PROTOS ${INCLUDES} ${SRCS} > prototypes.tmp
+ mv -f prototypes.tmp prototypes.h
+ ${CPROTO} -v -DEXT_PROTOS ${INCLUDES} ${SRCS} > ext_prototypes.h
+ cat jwg-head.h ext_prototypes.h jwg-tail.h > jwg.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 \"libjwg Version ${VDEF} + Edits\"" > version.h; \
+ echo ${VDEF}-E > version-num; \
+ else \
+ echo "#define VERSION \"libjwg Version ${VNUM}\"" > version.h; \
+ echo ${VNUM} > version-num; \
+ fi
+
diff --git a/src/ext_prototypes.h b/src/ext_prototypes.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/ext_prototypes.h
diff --git a/src/jwg-head.h.in b/src/jwg-head.h.in
new file mode 100644
index 0000000..117526d
--- /dev/null
+++ b/src/jwg-head.h.in
@@ -0,0 +1,50 @@
+/*
+ * jwg.h.in:
+ *
+ * Copyright (c) 2009 James McKenzie <20@madingley.org>,
+ * All rights reserved.
+ *
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * $Log$
+ * Revision 1.1 2009/02/08 16:25:32 root
+ * *** empty log message ***
+ *
+ *
+ */
+
+/* MAKE ABSOLUTELY SURE THAT YOU ARE EDITING THE jwg-head.h.in */
+/* FILE FROM WHICH THIS IS GENERATED - OTHERWISE YOUR EDITS */
+/* WILL BE LOST */
+
+#ifndef __JWG_H__
+#define __JWG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+/*the integer constants here are set by configure*/
+
+/*get uint32_t and friends defined */
+#if @I2_HAVE_STDINT_H@
+#include <stdint.h>
+#elif @I2_HAVE_SYS_INT_TYPES_H@
+#include <sys/int_types.h>
+#endif
+#if @I2_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 <@I2_TM_H@>
diff --git a/src/jwg-tail.h b/src/jwg-tail.h
new file mode 100644
index 0000000..7b45f3b
--- /dev/null
+++ b/src/jwg-tail.h
@@ -0,0 +1,5 @@
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __JWG_H__ */
diff --git a/src/libjwg.c b/src/libjwg.c
new file mode 100644
index 0000000..f12f079
--- /dev/null
+++ b/src/libjwg.c
@@ -0,0 +1,20 @@
+/*
+ * libjwg.c:
+ *
+ * Copyright (c) 2009 James McKenzie <20@madingley.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1 2009/02/08 16:25:32 root
+ * *** empty log message ***
+ *
+ *
+ */
+
+#include "project.h"
+
diff --git a/src/project.h b/src/project.h
new file mode 100644
index 0000000..7e5289d
--- /dev/null
+++ b/src/project.h
@@ -0,0 +1,78 @@
+/*
+ * project.h:
+ *
+ * Copyright (c) 2009 James McKenzie <20@madingley.org>,
+ * All rights reserved.
+ *
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * $Log$
+ * Revision 1.1 2009/02/08 16:25:32 root
+ * *** 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
+
+#ifdef INT_PROTOS
+#define INTERNAL
+#define EXTERNAL
+#else
+#ifdef EXT_PROTOS
+#define INTERNAL static
+#define EXTERNAL
+#else
+#define INTERNAL
+#define EXTERNAL
+#endif
+#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/version.c b/src/version.c
new file mode 100644
index 0000000..b9b0004
--- /dev/null
+++ b/src/version.c
@@ -0,0 +1,25 @@
+/*
+ * version.c:
+ *
+ * Copyright (c) 2009 James McKenzie <20@madingley.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1 2009/02/08 16:25:32 root
+ * *** empty log message ***
+ *
+ *
+ */
+
+#include "version.h"
+
+static char *
+GetVersion(void)
+{
+ return VERSION;
+}