summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/ucl/Makefile23
-rw-r--r--tools/ucl/lutil.h69
-rw-r--r--tools/ucl/src/Makefile26
3 files changed, 118 insertions, 0 deletions
diff --git a/tools/ucl/Makefile b/tools/ucl/Makefile
new file mode 100644
index 0000000000..aa0736767a
--- /dev/null
+++ b/tools/ucl/Makefile
@@ -0,0 +1,23 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id$
+#
+CFLAGS = -O2 -Iinclude
+
+TARGET = ../uclpack
+
+$(TARGET): uclpack.o src/libucl.a
+ $(CC) uclpack.o src/libucl.a -o $(TARGET)
+
+uclpack.o: uclpack.c
+
+src/libucl.a:
+ $(MAKE) -C src
+
+clean:
+ rm -f $(TARGET)
+ $(MAKE) -C src clean \ No newline at end of file
diff --git a/tools/ucl/lutil.h b/tools/ucl/lutil.h
new file mode 100644
index 0000000000..d83a8d1cb7
--- /dev/null
+++ b/tools/ucl/lutil.h
@@ -0,0 +1,69 @@
+/* lutil.h -- utilities
+
+ This file is part of the UCL data compression library.
+
+ Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer
+ All Rights Reserved.
+
+ The UCL library 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.
+
+ The UCL library 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 the UCL library; see the file COPYING.
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Markus F.X.J. Oberhumer
+ <markus@oberhumer.com>
+ */
+
+
+#include <stdio.h>
+#include <stddef.h>
+#if !defined(NO_STDLIB_H)
+# include <stdlib.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#if defined(HAVE_UNISTD_H) || defined(__DJGPP__) || defined(__EMX__)
+# include <unistd.h>
+#elif defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__MINGW32__)
+# include <unistd.h>
+#endif
+#if defined(HAVE_STAT)
+# include <sys/types.h>
+# include <sys/stat.h>
+#endif
+
+#include <ucl/uclconf.h>
+#include <ucl/uclutil.h>
+
+
+/* some systems have a xmalloc in their C library... */
+#undef xmalloc
+#undef xfree
+#undef xread
+#undef xwrite
+#undef xputc
+#undef xgetc
+#undef xread32
+#undef xwrite32
+#define xmalloc my_xmalloc
+#define xfree my_xfree
+
+
+#define HEAP_ALLOC(var,size) \
+ long __UCL_MMODEL var [ ((size) + (sizeof(long) - 1)) / sizeof(long) ]
+
+
+/*
+vi:ts=4:et
+*/
+
diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile
new file mode 100644
index 0000000000..0cfae54cb7
--- /dev/null
+++ b/tools/ucl/src/Makefile
@@ -0,0 +1,26 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id$
+#
+TARGET = libucl.a
+
+CFLAGS = -I../include
+
+SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \
+ n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \
+ ucl_dll.c ucl_init.c ucl_ptr.c ucl_str.c ucl_util.c
+
+OBJS = alloc.o io.o n2b_99.o n2b_d.o n2b_ds.o n2b_to.o n2d_99.o \
+ n2d_d.o n2d_ds.o n2d_to.o n2e_99.o n2e_d.o n2e_ds.o n2e_to.o ucl_crc.o \
+ ucl_dll.o ucl_init.o ucl_ptr.o ucl_str.o ucl_util.o
+
+$(TARGET): $(OBJS)
+ $(AR) ruv $(TARGET) $(OBJS)
+
+
+clean:
+ rm -f $(OBJS) $(TARGET)