]> mj.ucw.cz Git - libucw.git/commitdiff
An unfinished experiment in making a separate release of all libraries.
authorMartin Mares <mj@ucw.cz>
Wed, 25 Jul 2007 21:37:45 +0000 (23:37 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 25 Jul 2007 21:37:45 +0000 (23:37 +0200)
free/libs/Makefile [new file with mode: 0644]
free/libs/README [new file with mode: 0644]
free/libs/configure [new file with mode: 0755]
free/libs/defconfig [new file with mode: 0644]

diff --git a/free/libs/Makefile b/free/libs/Makefile
new file mode 100644 (file)
index 0000000..07745f6
--- /dev/null
@@ -0,0 +1,32 @@
+# Makefile for the stand-alone release of Sherlock libraries
+# (c) 2007 Martin Mares <mj@ucw.cz>
+
+# The default target
+all: runtree libs
+
+# Include configuration
+s=.
+-include obj/config.mk
+obj/config.mk:
+       @echo "You need to run configure first." && false
+
+# We will use the libucw build system
+include $(s)/build/Maketop
+
+# Set up names of common libraries (to avoid forward references in rules)
+LIBLANG=$(o)/lang/liblang.pc
+LIBCHARSET=$(o)/charset/libcharset.pc
+LIBIMAGES=$(o)/images/libimages.pc
+LIBSH=$(o)/sherlock/libsh.pc
+
+# Include makefiles of libraries we wish to use
+include $(s)/lib/Makefile
+include $(s)/charset/Makefile
+include $(s)/lang/Makefile
+include $(s)/images/Makefile
+include $(s)/sherlock/Makefile
+
+libs: $(LIBUCW) $(LIBSH) $(LIBIMAGES) $(LIBCHARSET) $(LIBLANG)
+
+# And finally the default rules of the build system
+include $(s)/build/Makebottom
diff --git a/free/libs/README b/free/libs/README
new file mode 100644 (file)
index 0000000..b24bded
--- /dev/null
@@ -0,0 +1,3 @@
+README for the free release of libraries
+
+               FIXME: Write
diff --git a/free/libs/configure b/free/libs/configure
new file mode 100755 (executable)
index 0000000..0313d74
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+# Configure Script for Stand-Alone Sherlock Libraries
+# (c) 2007 Martin Mares <mj@ucw.cz>
+
+use warnings;
+use strict;
+
+our $srcdir;
+BEGIN {
+       my $pkgfile = "lib/wildmatch.c";
+       if (!defined ($srcdir = $ENV{"SRCDIR"})) {
+               if (-f $pkgfile) {
+                       $srcdir=".";
+               } elsif ($0 =~ m@^(.*)/configure$@ && -f "$1/$pkgfile") {
+                       $srcdir=$1;
+               } else {
+                       die "Don't know how to find myself. Please set SRCDIR manually.";
+               }
+       }
+       require "$srcdir/lib/perl/Configure.pm";
+       UCW::Configure::import UCW::Configure;
+}
+
+Init($srcdir, "defconfig");    ## FIXME: Shouldn't we use default.cfg everywhere?
+Include "sherlock/default.cfg";
+Log "### Configuring Sherlock Libraries " . Get("SHERLOCK_VERSION") . " with configuration " . Get("CONFIG") . "\n";
+Include Get("CONFIG");
+Include "lib/autoconf.cfg";
+Include "sherlock/autoconf.cfg";
+Finish();
+
+Log "\nConfigured, run `make' to build everything.\n";
diff --git a/free/libs/defconfig b/free/libs/defconfig
new file mode 100644 (file)
index 0000000..24d9eb7
--- /dev/null
@@ -0,0 +1,31 @@
+# Default configuration of Sherlock libraries
+
+# Version string used by all Sherlock libraries
+# FIXME!
+Set("SHERLOCK_VERSION" => "0.0");
+
+UnSet("CONFIG_LARGE_FILES");
+
+# We want to build all libraries shared
+Set("CONFIG_SHARED");
+
+# Liblang settings
+Set("CONFIG_LANG");
+Set("MAX_WORD_LEN" => 64);
+
+# Libimages settings
+Set("CONFIG_IMAGES");
+Set("CONFIG_IMAGES_LIBJPEG");
+Set("CONFIG_IMAGES_LIBPNG");
+Set("CONFIG_IMAGES_LIBUNGIF");
+UnSet("CONFIG_IMAGES_LIBGIF");
+UnSet("CONFIG_IMAGES_LIBMAGICK");
+
+# We want the public API
+Set("CONFIG_INSTALL_API");
+
+# FIXME
+Set("DEFAULT_CONFIG" => "cf/library");
+
+# Return success
+1;