1 # Top part of Makefile for the UCW Libraries
2 # (c) 1997--2007 Martin Mares <mj@ucw.cz>
4 # Set to 1 if you want verbose output
7 # Disable all built-in rules and variables. Speeds up make and simplifies debugging.
10 CFLAGS=$(CLANG) $(COPT) $(CDEBUG) $(CWARNS) -I. -I$(o) -I$(s)
18 INSTALL_RUNDIRS=bin lib
22 # Various files whose type does not fit into PROGS
39 # Whenever "make -s" (silent) is run, turn on verbose mode (paradoxical, but gives the right result)
40 ifneq ($(findstring s,$(MAKEFLAGS)),)
44 # Define M (message) and Q (quiet command prefix) macros and also MAKESILENT passed to sub-makes
55 # Clean needs to be a double-colon rule since we want sub-makefiles to be able
56 # to define their own cleanup actions.
58 rm -f `find . -path "*~" -or -name "\#*\#" -or -name core`
59 rm -f allocs.tmp cscope.out
62 rm -rf obj tests run/bin/* run/lib/* run/include/* run/.tree-stamp TAGS
68 rm -f `find obj -name "*.test"`
70 # Relative symlinks and other pathname manipulation macros
72 space:=$(empty) $(empty)
73 backref=$(subst $(space),/,$(patsubst %,..,$(subst /,$(space),$(1))))
74 tack-on=$(if $(patsubst /%,,$(2)),$(1)/$(2),$(2))
75 symlink=ln -sf $(call tack-on,$(call backref,$(2)),$(1)) $(2)/