awful.rules: tag clients without flicker (FS#664)
[awesome.git] / Makefile
blob9e4e5964e5bd06597a7c30337c44758c8190d70f
1 builddir=.build-$(shell hostname)-$(shell gcc -dumpmachine)-$(shell gcc -dumpversion)
3 ifeq (,$(VERBOSE))
4 MAKEFLAGS:=$(MAKEFLAGS)s
5 ECHO=echo
6 else
7 ECHO=@:
8 endif
10 TARGETS=awesome
11 BUILDLN=build
13 all: $(TARGETS) $(BUILDLN) ;
15 $(TARGETS): cmake-build
16 ln -s -f ${builddir}/$@ $@
18 $(BUILDLN):
19 test -e $(BUILDLN) || ln -s -f ${builddir} $(BUILDLN)
21 cmake ${builddir}/CMakeCache.txt:
22 mkdir -p ${builddir}
23 $(ECHO) "Running cmake…"
24 cd ${builddir} && cmake $(CMAKE_ARGS) "$(@D)" ..
26 cmake-build: ${builddir}/CMakeCache.txt
27 $(ECHO) "Building…"
28 $(MAKE) -C ${builddir}
30 tags:
31 git ls-files | xargs ctags
33 install:
34 $(ECHO) "Installing…"
35 $(MAKE) -C ${builddir} install
37 distclean:
38 $(ECHO) -n "Cleaning up build directory…"
39 $(RM) -r ${builddir} $(BUILDLN) $(TARGETS)
40 $(ECHO) " done"
42 %: cmake
43 $(ECHO) "Running make $@…"
44 $(MAKE) -C ${builddir} $@
45 $(and $(filter clean,$@),$(RM) $(BUILDLN) $(TARGETS))
47 .PHONY: cmake-build cmake install $(BUILDLN)