diff options
-rw-r--r-- | tools/ucl/Makefile | 23 | ||||
-rw-r--r-- | tools/ucl/lutil.h | 69 | ||||
-rw-r--r-- | tools/ucl/src/Makefile | 26 |
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 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | CFLAGS = -O2 -Iinclude | ||
10 | |||
11 | TARGET = ../uclpack | ||
12 | |||
13 | $(TARGET): uclpack.o src/libucl.a | ||
14 | $(CC) uclpack.o src/libucl.a -o $(TARGET) | ||
15 | |||
16 | uclpack.o: uclpack.c | ||
17 | |||
18 | src/libucl.a: | ||
19 | $(MAKE) -C src | ||
20 | |||
21 | clean: | ||
22 | rm -f $(TARGET) | ||
23 | $(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 @@ | |||
1 | /* lutil.h -- utilities | ||
2 | |||
3 | This file is part of the UCL data compression library. | ||
4 | |||
5 | Copyright (C) 1996-2002 Markus Franz Xaver Johannes Oberhumer | ||
6 | All Rights Reserved. | ||
7 | |||
8 | The UCL library is free software; you can redistribute it and/or | ||
9 | modify it under the terms of the GNU General Public License as | ||
10 | published by the Free Software Foundation; either version 2 of | ||
11 | the License, or (at your option) any later version. | ||
12 | |||
13 | The UCL library is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with the UCL library; see the file COPYING. | ||
20 | If not, write to the Free Software Foundation, Inc., | ||
21 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
22 | |||
23 | Markus F.X.J. Oberhumer | ||
24 | <markus@oberhumer.com> | ||
25 | */ | ||
26 | |||
27 | |||
28 | #include <stdio.h> | ||
29 | #include <stddef.h> | ||
30 | #if !defined(NO_STDLIB_H) | ||
31 | # include <stdlib.h> | ||
32 | #endif | ||
33 | #include <string.h> | ||
34 | #include <ctype.h> | ||
35 | #if defined(HAVE_UNISTD_H) || defined(__DJGPP__) || defined(__EMX__) | ||
36 | # include <unistd.h> | ||
37 | #elif defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(__MINGW32__) | ||
38 | # include <unistd.h> | ||
39 | #endif | ||
40 | #if defined(HAVE_STAT) | ||
41 | # include <sys/types.h> | ||
42 | # include <sys/stat.h> | ||
43 | #endif | ||
44 | |||
45 | #include <ucl/uclconf.h> | ||
46 | #include <ucl/uclutil.h> | ||
47 | |||
48 | |||
49 | /* some systems have a xmalloc in their C library... */ | ||
50 | #undef xmalloc | ||
51 | #undef xfree | ||
52 | #undef xread | ||
53 | #undef xwrite | ||
54 | #undef xputc | ||
55 | #undef xgetc | ||
56 | #undef xread32 | ||
57 | #undef xwrite32 | ||
58 | #define xmalloc my_xmalloc | ||
59 | #define xfree my_xfree | ||
60 | |||
61 | |||
62 | #define HEAP_ALLOC(var,size) \ | ||
63 | long __UCL_MMODEL var [ ((size) + (sizeof(long) - 1)) / sizeof(long) ] | ||
64 | |||
65 | |||
66 | /* | ||
67 | vi:ts=4:et | ||
68 | */ | ||
69 | |||
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 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
8 | # | ||
9 | TARGET = libucl.a | ||
10 | |||
11 | CFLAGS = -I../include | ||
12 | |||
13 | SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ | ||
14 | n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \ | ||
15 | ucl_dll.c ucl_init.c ucl_ptr.c ucl_str.c ucl_util.c | ||
16 | |||
17 | OBJS = alloc.o io.o n2b_99.o n2b_d.o n2b_ds.o n2b_to.o n2d_99.o \ | ||
18 | n2d_d.o n2d_ds.o n2d_to.o n2e_99.o n2e_d.o n2e_ds.o n2e_to.o ucl_crc.o \ | ||
19 | ucl_dll.o ucl_init.o ucl_ptr.o ucl_str.o ucl_util.o | ||
20 | |||
21 | $(TARGET): $(OBJS) | ||
22 | $(AR) ruv $(TARGET) $(OBJS) | ||
23 | |||
24 | |||
25 | clean: | ||
26 | rm -f $(OBJS) $(TARGET) | ||