1 builddir
=.build-
$(shell hostname
)-$(shell gcc
-dumpmachine
)-$(shell gcc
-dumpversion
)
4 MAKEFLAGS
:=$(MAKEFLAGS
)s
13 all: $(TARGETS
) $(BUILDLN
) ;
15 $(TARGETS
): cmake-build
16 ln
-s
-f
${builddir}/$@
$@
19 test -e
$(BUILDLN
) || ln
-s
-f
${builddir} $(BUILDLN
)
21 cmake
${builddir}/CMakeCache.txt
:
23 $(ECHO
) "Running cmake…"
24 cd
${builddir} && cmake
"$(@D)" ..
26 cmake-build
: ${builddir}/CMakeCache.txt
28 $(MAKE
) -C
${builddir}
31 git ls-files | xargs ctags
35 $(MAKE
) -C
${builddir} install
38 $(ECHO
) -n
"Cleaning up build directory…"
39 $(RM
) -r
${builddir} $(BUILDLN
) $(TARGETS
)
43 $(ECHO
) "Running make $@…"
44 $(MAKE
) -C
${builddir} $@
45 $(and
$(filter clean,$@
),$(RM
) $(BUILDLN
) $(TARGETS
))
47 .PHONY
: cmake-build cmake
install $(BUILDLN
)