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