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-- |
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 |
|
ef929533d040
Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
6 |
ALL: build |
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 {} \; |