1 # Top part of Makefile for the UCW Libraries
2 # (c) 1997--2008 Martin Mares <mj@ucw.cz>
4 # Set to 1 if you want verbose output
7 # Set to 'y' (or 'n') if you want to auto-confirm (auto-reject) all questions in build/installer
10 # Disable all built-in rules and variables. Speeds up make and simplifies debugging.
13 CFLAGS=$(CLANG) $(COPT) $(CDEBUG) $(CWARNS) $(CEXTRA) -I. -I$(o) -I$(s)
14 LDFLAGS=$(LOPT) $(LEXTRA)
23 INSTALL_RUNDIRS=bin lib
27 # Various files whose type does not fit into PROGS
45 # Whenever "make -s" (silent) is run, turn on verbose mode (paradoxical, but gives the right result)
46 ifneq ($(findstring s,$(MAKEFLAGS)),)
50 # Define M (message) and Q (quiet command prefix) macros and also MAKESILENT passed to sub-makes
61 # Clean needs to be a double-colon rule since we want sub-makefiles to be able
62 # to define their own cleanup actions.
64 rm -f `find . -path "*~" -or -name "\#*\#"`
65 rm -f allocs.tmp cscope.out TAGS
68 rm -rf `find obj/ucw -mindepth 1 -maxdepth 1 -not -name autoconf.h`
69 rm -rf `find obj -mindepth 1 -maxdepth 1 -not \( -name config.mk -o -name autoconf.h -o -name ucw \)`
70 rm -rf tests run/{bin,lib,include,.tree-stamp,doc}
76 rm -f `find obj -name "*.test"`
79 rm -f $(DOCS) $(patsubst %.html,%.txt,$(DOCS))
81 # Extra default rules (appended to by submakefiles)
84 # Relative symlinks and other pathname manipulation macros
86 space:=$(empty) $(empty)
87 backref=$(subst $(space),/,$(patsubst %,..,$(subst /,$(space),$(1))))
88 tack-on=$(if $(patsubst /%,,$(2)),$(1)/$(2),$(2))
89 symlink=ln -sf $(call tack-on,$(call backref,$(2)),$(1)) $(2)/
90 symlink-alias=ln -sf $(call tack-on,$(call backref,$(2)),$(1)) $(2)/$(3)