Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 15:42:18 +0100
changeset 28 ef929533d040
child 30 eed9f710ba3b
permissions -rw-r--r--
Default Makefile for Cmake based projects committer: Markus Bröker <mbroeker@largo.homelinux.org>

MAKE=make --no-print-directory
CMAKE=cmake
RMDIR=rm -rf
RM=rm -f

ALL: build

build: build/Makefile
	@$(MAKE) -C build

prepare:
	@if [ ! -d build ]; then mkdir build; fi

build/Makefile: prepare
	cd build && $(CMAKE) ../src

.PHONY: distclean prepare beauty

clean: build/Makefile
	@$(MAKE) -C build clean

distclean:
	$(RMDIR) build

install: build/Makefile
	$(MAKE) -C build install

beauty:
	find -name '*.[ch]' -exec indent {} \;
	find -name '*.[ch]' -exec eraser {} \;
	find -name '*~' -exec rm -f {} \;