2 # XXX: The cut pipe is to strip the leading "./" from find results. It's
3 # a little ugly but I couldn't find a better way to get a list of all
4 # headers in the directory (recursively).
5 HEADERS = $(shell find -name '*.hpp' | cut -b3-)
9 # prefix for installing the binaries
14 INSTALL = install -p -m 0644 -D
17 # install utility functions
18 install_msg = echo " INSTALL $(1)"
20 install_files = @$(call install_msg,$(2)) && \
22 $(call install,$$f,$(2)/$$f); \
27 NICE_CLEAN = @echo " CLEAN"; $(RM)
28 install = $(INSTALL) $(1) $(2)
31 install = $(call install_msg,$(2)); $(INSTALL) $(1) $(2)
39 install: install-headers
41 install-headers: .install-headers-stamp
43 .install-headers-stamp: $(HEADERS)
44 $(call install_files,$^,$(prefix)/include/$(HDRPATH))
47 $(NICE_CLEAN) .*-stamp
49 .PHONY: default all install install-headers clean