]> mj.ucw.cz Git - libucw.git/blob - free/libs/Makefile
Fix kmp-test in libs-only distribution
[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 BUILDSYS=$(s)/build
14
15 # We will use the libucw build system
16 include $(BUILDSYS)/Maketop
17
18 # Install the build system
19 include $(BUILDSYS)/Makefile
20
21 ifndef CONFIG_UCW_ONLY
22 # Set up names of common libraries (to avoid forward references in rules)
23 LIBCHARSET=$(o)/charset/libcharset.pc
24 LIBSH=$(o)/sherlock/libsh.pc
25 LIBSHXML=$(o)/sherlock/xml/libshxml.pc
26 endif
27
28 # The UCW library
29 include $(s)/ucw/Makefile
30
31 # Stripped down version
32 ifndef CONFIG_UCW_ONLY
33
34 TESTING_DEPS=$(LIBSH)
35
36 # Install config files
37 FREE_CONFIGS=sherlock local
38 CONFIGS+=$(FREE_CONFIGS)
39
40 INSTALL_TARGETS+=install-configs
41 install-configs:
42         install -d -m 755 $(DESTDIR)$(INSTALL_CONFIG_DIR)
43         install -m 644 $(addprefix run/$(CONFIG_DIR)/,$(FREE_CONFIGS)) $(DESTDIR)$(INSTALL_CONFIG_DIR)
44
45 # Include makefiles of libraries we wish to use
46 include $(s)/charset/Makefile
47 include $(s)/sherlock/Makefile
48
49 ifdef CONFIG_LANG
50 LIBLANG=$(o)/lang/liblang.pc
51 include $(s)/lang/Makefile
52 endif
53
54 ifdef CONFIG_IMAGES
55 LIBIMAGES=$(o)/images/libimages.pc
56 include $(s)/images/Makefile
57 endif
58
59 endif
60
61 # Build documentation by default?
62 ifdef CONFIG_DOC
63 all: docs
64 endif
65
66 libs: $(LIBUCW) $(LIBSH) $(LIBIMAGES) $(LIBCHARSET) $(LIBLANG)
67
68 # And finally the default rules of the build system
69 include $(BUILDSYS)/Makebottom
70
71 ifndef CONFIG_LOCAL
72 install: all $(INSTALL_TARGETS)
73 else
74 install:
75         @echo "Nothing to install, this is a local build." && false
76 endif
77 .PHONY: install