author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Thu, 25 Dec 2008 19:55:07 +0100 | |
changeset 31 | bbcb8a3366b4 |
parent 30 | eed9f710ba3b |
child 33 | 56571d34d754 |
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 |
|
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 {} \; |