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