]> mj.ucw.cz Git - libucw.git/blob - free/libs/Makefile
Install the build system
[libucw.git] / free / libs / Makefile
1 # Makefile for the stand-alone release of Sherlock libraries
2 # (c) 2007 Martin Mares <mj@ucw.cz>
3
4 # The default target
5 all: runtree libs api programs extras configs
6
7 # Include configuration
8 s=.
9 -include obj/config.mk
10 obj/config.mk:
11         @echo "You need to run configure first." && false
12
13 # We will use the libucw build system
14 include $(s)/build/Maketop
15
16 # Install the build system
17 include $(s)/build/Makefile
18
19 # The UCW library
20 include $(s)/ucw/Makefile
21
22 # Stripped down version
23 ifndef CONFIG_UCW_ONLY
24
25 # Install config files
26 FREE_CONFIGS=sherlock local
27 CONFIGS+=$(FREE_CONFIGS)
28
29 INSTALL_TARGETS+=install-configs
30 install-configs:
31         install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR)
32         install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(FREE_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR)
33
34 # Set up names of common libraries (to avoid forward references in rules)
35 LIBCHARSET=$(o)/charset/libcharset.pc
36 LIBSH=$(o)/sherlock/libsh.pc
37 LIBSHXML=$(o)/sherlock/xml/libshxml.pc
38
39 # Include makefiles of libraries we wish to use
40 include $(s)/charset/Makefile
41 include $(s)/sherlock/Makefile
42
43 ifdef CONFIG_LANG
44 LIBLANG=$(o)/lang/liblang.pc
45 include $(s)/lang/Makefile
46 endif
47
48 ifdef CONFIG_IMAGES
49 LIBIMAGES=$(o)/images/libimages.pc
50 include $(s)/images/Makefile
51 endif
52
53 endif
54
55 # Build documentation by default?
56 ifdef CONFIG_DOC
57 all: docs
58 endif
59
60 libs: $(LIBUCW) $(LIBSH) $(LIBIMAGES) $(LIBCHARSET) $(LIBLANG)
61
62 # And finally the default rules of the build system
63 include $(s)/build/Makebottom
64
65 ifndef CONFIG_LOCAL
66 install: all $(INSTALL_TARGETS)
67 else
68 install:
69         @echo "Nothing to install, this is a local build." && false
70 endif
71 .PHONY: install