--- /dev/null
+# Example Makefile for a stand-alone program using the libucw build system
+# (c) 2007 Martin Mares <mj@ucw.cz>
+# (c) 2008 Michal Vaner <vorner@ucw.cz>
+
+# The default target
+all: runtree programs
+
+# Include configuration
+s=.
+-include obj/config.mk
+obj/config.mk:
+ @echo "You need to run configure first." && false
+
+# Do not show strange errors if the BUILDSYS is not set
+# (it happens if noone called configure as reported above)
+ifdef BUILDSYS
+
+# We will use the libucw build system
+include $(BUILDSYS)/Maketop
+
+# Add the detected flags to all the global flags
+CFLAGS+=$(LIBUCW_CFLAGS)
+LIBS+=$(LIBUCW_LIBS)
+
+# Programs we want to compile
+PROGS+=$(o)/test
+
+# And how they are created
+$(o)/test: $(o)/test.o $(LIBUCW)
+
+# And finally the default rules of the build system
+include $(BUILDSYS)/Makebottom
+
+endif
--- /dev/null
+#!/usr/bin/perl
+# Configure script for the libucw example (inspired by ../external/configure)
+# (c) 2008 Michal Vaner <vorner@ucw.cz>
+
+use warnings;
+use strict;
+
+our($srcdir, $libdir);
+BEGIN {
+ # Find the sources
+ my $pkgfile = "test.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.\n";
+ }
+ }
+ # Ask pkg-config if libucw is installed and find its configure modules
+ `pkg-config libucw --atleast-version=3.13`;
+ !$? or die "Package `libucw' (version 3.13 or newer) not found. Is PKG_CONFIG_PATH set properly?\n";
+ $libdir=`pkg-config libucw --variable=perl_modules_dir`;
+ chomp $libdir;
+ die "Unable to find the libucw configure system\n" if $? || not defined $libdir;
+}
+use lib $libdir;
+use UCW::Configure;
+
+Init($srcdir, 'default.cfg');
+Log "### Configuring TestApp ###\n\n";
+Include Get("CONFIG");
+# What should be detected?
+require UCW::Configure::Build;
+require UCW::Configure::Paths;
+require UCW::Configure::C;
+require UCW::Configure::Pkg;
+# You could generate your own documentation, too
+# require UCW::Configure::Doc;
+
+# Get some libraries
+UCW::Configure::Pkg::PkgConfig("libucw") or Fail("libUCW is required");
+Finish();
+
+Log "\nConfigured, run `make' to build everything.\n";
--- /dev/null
+
+# You can specify default configuration here:
+# Set("SOME_SYMBOL");
+
+1;
--- /dev/null
+#include <ucw/lib.h>
+
+int main(void)
+{
+ log_init("test");
+ msg(L_INFO, "Hoooot!");
+ return 0;
+}
--- /dev/null
+# Example Makefile for a stand-alone program using libucw
+
+CFLAGS:=$(shell pkg-config --cflags libucw)
+LDLIBS:=$(shell pkg-config --libs libucw)
+
+all: test
+
+test: test.c
--- /dev/null
+#include <ucw/lib.h>
+
+int main(void)
+{
+ log_init("test");
+ msg(L_INFO, "Hoooot!");
+ return 0;
+}
--- /dev/null
+# Example Makefile for a stand-alone program using the libucw build system
+# (c) 2007 Martin Mares <mj@ucw.cz>
+
+# The default target
+all: runtree programs
+
+# Include configuration
+s=.
+-include obj/config.mk
+obj/config.mk:
+ @echo "You need to run configure first." && false
+
+BUILDSYS=$(s)/build
+
+# We will use the libucw build system
+include $(BUILDSYS)/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
+
+# Include makefiles of libraries we wish to use
+include $(s)/ucw/Makefile
+include $(s)/charset/Makefile
+include $(s)/lang/Makefile
+include $(s)/images/Makefile
+
+# Programs we want to compile
+PROGS+=$(o)/test
+$(o)/test: $(o)/test.o $(LIBUCW) $(LIBLANG) $(LIBCHARSET) $(LIBIMAGES)
+
+# All tests (%-t) get automatically linked with libucw
+TESTING_DEPS=$(LIBUCW)
+
+# And finally the default rules of the build system
+include $(BUILDSYS)/Makebottom
--- /dev/null
+#!/usr/bin/perl
+# Configure script for the libucw example
+# (c) 2007 Martin Mares <mj@ucw.cz>
+
+use warnings;
+use strict;
+
+our $srcdir;
+BEGIN {
+ my $pkgfile = "ucw/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.\n";
+ }
+ }
+}
+
+use lib "$srcdir/ucw/perl/";
+use UCW::Configure;
+
+Init($srcdir, "default.cfg");
+Include "ucw/default.cfg";
+Log "### Configuring TestApp ###\n\n";
+Include Get("CONFIG");
+require UCW::Configure::Paths;
+require UCW::Configure::C;
+require UCW::Configure::LibUCW;
+Finish();
+
+Log "\nConfigured, run `make' to build everything.\n";
--- /dev/null
+# Default configuration file for our test application
+
+# Do a local build
+Set("CONFIG_LOCAL");
+
+# We want to build all libraries shared
+Set("CONFIG_SHARED");
+
+# Liblang settings
+Set("CONFIG_LIBLANG");
+Set("CONFIG_LANG");
+Set("MAX_WORD_CHARS" => 64);
+Set("MAX_WORD_BYTES" => 192);
+
+# 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");
+
+# Return success
+1;
--- /dev/null
+#include <ucw/lib.h>
+
+int main(void)
+{
+ log_init("test");
+ msg(L_INFO, "Hoooot!");
+ return 0;
+}
+++ /dev/null
-# Example Makefile for a stand-alone program using the libucw build system
-# (c) 2007 Martin Mares <mj@ucw.cz>
-# (c) 2008 Michal Vaner <vorner@ucw.cz>
-
-# The default target
-all: runtree programs
-
-# Include configuration
-s=.
--include obj/config.mk
-obj/config.mk:
- @echo "You need to run configure first." && false
-
-# Do not show strange errors if the BUILDSYS is not set
-# (it happens if noone called configure as reported above)
-ifdef BUILDSYS
-
-# We will use the libucw build system
-include $(BUILDSYS)/Maketop
-
-# Add the detected flags to all the global flags
-CFLAGS+=$(LIBUCW_CFLAGS)
-LIBS+=$(LIBUCW_LIBS)
-
-# Programs we want to compile
-PROGS+=$(o)/test
-
-# And how they are created
-$(o)/test: $(o)/test.o $(LIBUCW)
-
-# And finally the default rules of the build system
-include $(BUILDSYS)/Makebottom
-
-endif
+++ /dev/null
-#!/usr/bin/perl
-# Configure script for the libucw example (inspired by ../external/configure)
-# (c) 2008 Michal Vaner <vorner@ucw.cz>
-
-use warnings;
-use strict;
-
-our($srcdir, $libdir);
-BEGIN {
- # Find the sources
- my $pkgfile = "test.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.\n";
- }
- }
- # Ask pkg-config if libucw is installed and find its configure modules
- `pkg-config libucw --atleast-version=3.13`;
- !$? or die "Package `libucw' (version 3.13 or newer) not found. Is PKG_CONFIG_PATH set properly?\n";
- $libdir=`pkg-config libucw --variable=perl_modules_dir`;
- chomp $libdir;
- die "Unable to find the libucw configure system\n" if $? || not defined $libdir;
-}
-use lib $libdir;
-use UCW::Configure;
-
-Init($srcdir, 'default.cfg');
-Log "### Configuring TestApp ###\n\n";
-Include Get("CONFIG");
-# What should be detected?
-require UCW::Configure::Build;
-require UCW::Configure::Paths;
-require UCW::Configure::C;
-require UCW::Configure::Pkg;
-# You could generate your own documentation, too
-# require UCW::Configure::Doc;
-
-# Get some libraries
-UCW::Configure::Pkg::PkgConfig("libucw") or Fail("libUCW is required");
-Finish();
-
-Log "\nConfigured, run `make' to build everything.\n";
+++ /dev/null
-
-# You can specify default configuration here:
-# Set("SOME_SYMBOL");
-
-1;
+++ /dev/null
-#include <ucw/lib.h>
-
-int main(void)
-{
- log_init("test");
- msg(L_INFO, "Hoooot!");
- return 0;
-}
+++ /dev/null
-# Example Makefile for a stand-alone program using libucw
-
-CFLAGS:=$(shell pkg-config --cflags libucw)
-LDLIBS:=$(shell pkg-config --libs libucw)
-
-all: test
-
-test: test.c
+++ /dev/null
-#include <ucw/lib.h>
-
-int main(void)
-{
- log_init("test");
- msg(L_INFO, "Hoooot!");
- return 0;
-}
+++ /dev/null
-# Example Makefile for a stand-alone program using the libucw build system
-# (c) 2007 Martin Mares <mj@ucw.cz>
-
-# The default target
-all: runtree programs
-
-# Include configuration
-s=.
--include obj/config.mk
-obj/config.mk:
- @echo "You need to run configure first." && false
-
-BUILDSYS=$(s)/build
-
-# We will use the libucw build system
-include $(BUILDSYS)/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
-
-# Include makefiles of libraries we wish to use
-include $(s)/ucw/Makefile
-include $(s)/charset/Makefile
-include $(s)/lang/Makefile
-include $(s)/images/Makefile
-
-# Programs we want to compile
-PROGS+=$(o)/test
-$(o)/test: $(o)/test.o $(LIBUCW) $(LIBLANG) $(LIBCHARSET) $(LIBIMAGES)
-
-# All tests (%-t) get automatically linked with libucw
-TESTING_DEPS=$(LIBUCW)
-
-# And finally the default rules of the build system
-include $(BUILDSYS)/Makebottom
+++ /dev/null
-#!/usr/bin/perl
-# Configure script for the libucw example
-# (c) 2007 Martin Mares <mj@ucw.cz>
-
-use warnings;
-use strict;
-
-our $srcdir;
-BEGIN {
- my $pkgfile = "ucw/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.\n";
- }
- }
-}
-
-use lib "$srcdir/ucw/perl/";
-use UCW::Configure;
-
-Init($srcdir, "default.cfg");
-Include "ucw/default.cfg";
-Log "### Configuring TestApp ###\n\n";
-Include Get("CONFIG");
-require UCW::Configure::Paths;
-require UCW::Configure::C;
-require UCW::Configure::LibUCW;
-Finish();
-
-Log "\nConfigured, run `make' to build everything.\n";
+++ /dev/null
-# Default configuration file for our test application
-
-# Do a local build
-Set("CONFIG_LOCAL");
-
-# We want to build all libraries shared
-Set("CONFIG_SHARED");
-
-# Liblang settings
-Set("CONFIG_LIBLANG");
-Set("CONFIG_LANG");
-Set("MAX_WORD_CHARS" => 64);
-Set("MAX_WORD_BYTES" => 192);
-
-# 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");
-
-# Return success
-1;
+++ /dev/null
-#include <ucw/lib.h>
-
-int main(void)
-{
- log_init("test");
- msg(L_INFO, "Hoooot!");
- return 0;
-}