]> mj.ucw.cz Git - libucw.git/blobdiff - free/libs/Makefile
Install the build system
[libucw.git] / free / libs / Makefile
index 4c55eb9b47ac4e4bcf0de627347e16c0396740d8..585445652ec60906c3503fa890da08e26900220a 100644 (file)
@@ -13,15 +13,30 @@ obj/config.mk:
 # We will use the libucw build system
 include $(s)/build/Maketop
 
+# Install the build system
+include $(s)/build/Makefile
+
+# The UCW library
+include $(s)/ucw/Makefile
+
+# Stripped down version
+ifndef CONFIG_UCW_ONLY
+
 # Install config files
-CONFIGS+=sherlock local
+FREE_CONFIGS=sherlock local
+CONFIGS+=$(FREE_CONFIGS)
+
+INSTALL_TARGETS+=install-configs
+install-configs:
+       install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR)
+       install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(FREE_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR)
 
 # Set up names of common libraries (to avoid forward references in rules)
 LIBCHARSET=$(o)/charset/libcharset.pc
 LIBSH=$(o)/sherlock/libsh.pc
+LIBSHXML=$(o)/sherlock/xml/libshxml.pc
 
 # Include makefiles of libraries we wish to use
-include $(s)/ucw/Makefile
 include $(s)/charset/Makefile
 include $(s)/sherlock/Makefile
 
@@ -35,7 +50,22 @@ LIBIMAGES=$(o)/images/libimages.pc
 include $(s)/images/Makefile
 endif
 
+endif
+
+# Build documentation by default?
+ifdef CONFIG_DOC
+all: docs
+endif
+
 libs: $(LIBUCW) $(LIBSH) $(LIBIMAGES) $(LIBCHARSET) $(LIBLANG)
 
 # And finally the default rules of the build system
 include $(s)/build/Makebottom
+
+ifndef CONFIG_LOCAL
+install: all $(INSTALL_TARGETS)
+else
+install:
+       @echo "Nothing to install, this is a local build." && false
+endif
+.PHONY: install