Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Fri, 26 Dec 2008 11:23:45 +0100
changeset 32 89fb9c6611ca
parent 30 eed9f710ba3b
child 33 56571d34d754
permissions -rw-r--r--
unix system accounts are less than 1000 The bot don't need to appear in KDE or GNOME committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
MAKE=make --no-print-directory
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
CMAKE=cmake
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
RMDIR=rm -rf
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
RM=rm -f
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
30
eed9f710ba3b This change isn't worth a commit...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 28
diff changeset
     6
all: build
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
build: build/Makefile
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
	@$(MAKE) -C build
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
prepare:
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
	@if [ ! -d build ]; then mkdir build; fi
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
build/Makefile: prepare
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
	cd build && $(CMAKE) ../src
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
.PHONY: distclean prepare beauty
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
clean: build/Makefile
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
	@$(MAKE) -C build clean
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
distclean:
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    23
	$(RMDIR) build
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    24
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    25
install: build/Makefile
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    26
	$(MAKE) -C build install
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
beauty:
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
	find -name '*.[ch]' -exec indent {} \;
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    30
	find -name '*.[ch]' -exec eraser {} \;
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    31
	find -name '*~' -exec rm -f {} \;