Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Fri, 22 Oct 2010 19:18:16 +0200
changeset 57 ca4e10daa1c9
parent 53 ec1eec96e433
permissions -rw-r--r--
vaccuum spelling error prints now: "i have reorganized the database" committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
53
ec1eec96e433 Compatibility: use default prefix and std make switches
Markus Bröker <mbroeker@volpe.spectre.org>
parents: 52
diff changeset
     1
MAKE=make
28
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
53
ec1eec96e433 Compatibility: use default prefix and std make switches
Markus Bröker <mbroeker@volpe.spectre.org>
parents: 52
diff changeset
     5
INDENT=indent
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
30
eed9f710ba3b This change isn't worth a commit...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 28
diff changeset
     7
all: build
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
build: build/Makefile
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
	@$(MAKE) -C build
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
prepare:
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
	@if [ ! -d build ]; then mkdir build; fi
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
build/Makefile: prepare
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
	cd build && $(CMAKE) ../src
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
33
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    18
.PHONY: distclean debclean prepare beauty
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
clean: build/Makefile
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
	@$(MAKE) -C build clean
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
33
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    23
deb: debclean
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    24
	dpkg-buildpackage -r
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    25
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    26
debclean:
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    27
	fakeroot debian/rules clean
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    28
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    29
distclean:
43
07afbd7a1567 distclean: remove the debian build dir
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 33
diff changeset
    30
	$(RMDIR) build debian/mcbot
33
56571d34d754 safe buffers, a memory leak and cleanups
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 30
diff changeset
    31
	$(RM) locale/de/LC_MESSAGES/mcbot.mo
28
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    32
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    33
install: build/Makefile
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    34
	$(MAKE) -C build install
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    35
ef929533d040 Default Makefile for Cmake based projects
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    36
beauty:
53
ec1eec96e433 Compatibility: use default prefix and std make switches
Markus Bröker <mbroeker@volpe.spectre.org>
parents: 52
diff changeset
    37
	find . -name '*.[ch]' -exec $(INDENT) {} \;
52
c9401e6a62cb Compatibility to other distributions...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 43
diff changeset
    38
	find . -name '*.[ch]' -exec eraser {} \;
c9401e6a62cb Compatibility to other distributions...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 43
diff changeset
    39
	find . -name '*~' -exec rm -f {} \;