# Install the build system
include $(BUILDSYS)/Makefile
-ifndef CONFIG_UCW_ONLY
# Set up names of common libraries (to avoid forward references in rules)
+ifdef CONFIG_CHARSET
LIBCHARSET=$(o)/charset/libcharset.pc
+endif
+ifdef CONFIG_SHERLOCK_LIB
LIBSH=$(o)/sherlock/libsh.pc
LIBSHXML=$(o)/sherlock/xml/libshxml.pc
+TESTING_DEPS=$(LIBSH)
+else
+TESTING_DEPS=$(LIBUCW)
endif
# The UCW library
include $(s)/ucw/Makefile
-# Stripped down version
-ifndef CONFIG_UCW_ONLY
-
-TESTING_DEPS=$(LIBSH)
-
# Install config files
+ifdef CONFIG_SHERLOCK_LIB
FREE_CONFIGS=sherlock local
CONFIGS+=$(FREE_CONFIGS)
install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR)
install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(FREE_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR)
+include $(s)/sherlock/Makefile
+endif
+
+ifdef CONFIG_CHARSET
# Include makefiles of libraries we wish to use
include $(s)/charset/Makefile
-include $(s)/sherlock/Makefile
+endif
ifdef CONFIG_LANG
LIBLANG=$(o)/lang/liblang.pc
include $(s)/images/Makefile
endif
-else
-
-TESTING_DEPS=$(LIBUCW)
-
-endif
-
# Build documentation by default?
ifdef CONFIG_DOC
all: docs
Set("CONFIG_UCW_SHELL_UTILS" => 1);
Set("CONFIG_UCW_UTILS" => 1);
-# Libsh settings
-Set("CONFIG_BUCKET_SHIFT" => 6);
-
-# Liblang settings
-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");
+if(!IsSet("CONFIG_UCW_ONLY")) {
+ # Libsh settings
+ Set("CONFIG_BUCKET_SHIFT" => 6);
+ Set("CONFIG_SHERLOCK_LIB");
+
+ if(!IsGiven("CONFIG_CHARSET") || IsSet("CONFIG_CHARSET")) {
+ # Liblang settings
+ 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");
+
+ Set("CONFIG_CHARSET");
+}
# Return success
1;
kmp1_cleanup(&kmp);
}
-#ifndef CONFIG_UCW_ONLY /* This one depends on LIBCHARSET */
+#ifdef CONFIG_CHARSET /* This one depends on LIBCHARSET */
/* TEST2 - various tracing */
main(void)
{
test1();
-#ifndef CONFIG_UCW_ONLY
+#ifdef CONFIG_CHARSET
test2();
#endif
test3();