]> mj.ucw.cz Git - libucw.git/blobdiff - free/libs/Makefile
Options to include separate libraries in build
[libucw.git] / free / libs / Makefile
index 5b69935473f6129c1ec796988981b9b87d64a19b..430977eb28ea4afdd2109101b052f37df227f1f6 100644 (file)
@@ -18,22 +18,23 @@ include $(BUILDSYS)/Maketop
 # 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)
 
@@ -42,9 +43,13 @@ install-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
@@ -56,12 +61,6 @@ LIBIMAGES=$(o)/images/libimages.pc
 include $(s)/images/Makefile
 endif
 
-else
-
-TESTING_DEPS=$(LIBUCW)
-
-endif
-
 # Build documentation by default?
 ifdef CONFIG_DOC
 all: docs