Mercurial > garten
annotate Makefile @ 11:176ee28e7464
switched from mysql to sqlite; (+ some cleanups)
author | meillo@marmaro.de |
---|---|
date | Wed, 23 Jul 2008 11:41:38 +0200 |
parents | 13c6828bd4a5 |
children | 8db6497d6065 |
rev | line source |
---|---|
5 | 1 # garten by meillo@marmaro.de |
2 | |
3 | |
4 NAME=garten | |
5 # extracts VERSION from the sources | |
6 #VERSION=$(shell cat *.c | sed -n '/define VERSION/ s/.*"\([^"]*\)".*/\1/p' ) | |
7 #NV=${NAME}-${VERSION} | |
8 | |
9 #DOCS=LICENSE README ChangeLog TODO examples | |
10 | |
11 # paths | |
12 #PREFIX = /usr | |
13 #BINDIR = ${PREFIX}/bin | |
14 #MANDIR = ${PREFIX}/share/man | |
15 | |
16 # compile env | |
17 CC = gcc | |
18 LD = ${CC} | |
19 DEBUG = -g | |
20 CFLAGS = -Wall -c ${DEBUG} | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
21 LDFLAGS = -Wall ${DEBUG} -lsqlite3 |
5 | 22 |
23 # files | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
24 DEP = db.h game.h |
5 | 25 |
26 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
27 .PHONY: all |
5 | 28 all: options build |
29 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
30 .PHONY: options |
5 | 31 options: |
32 @echo build options: | |
33 @echo "CC = ${CC}" | |
34 @echo "LD = ${LD}" | |
35 @echo "CFLAGS = ${CFLAGS}" | |
36 @echo "LDFLAGS = ${LDFLAGS}" | |
37 @echo | |
38 | |
39 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
40 .PHONY: build |
5 | 41 build: options ${NAME} |
42 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
43 bin/clock: clock.c $(DEP) |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
44 $(CC) -o $@ $(LDFLAGS) clock.c |
5 | 45 |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
46 bin/weather: weather.c $(DEP) |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
47 $(CC) -o $@ $(LDFLAGS) weather.c |
5 | 48 |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
49 bin/environment: environment.c $(DEP) |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
50 $(CC) -o $@ $(LDFLAGS) environment.c |
5 | 51 |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
52 bin/growth: growth.c $(DEP) |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
53 $(CC) -o $@ $(LDFLAGS) growth.c |
6
e3679f888813
added environment module (only static code)
meillo@marmaro.de
parents:
5
diff
changeset
|
54 |
7
b1e309dc0b98
added growth module (quite static and limited implementation)
meillo@marmaro.de
parents:
6
diff
changeset
|
55 |
b1e309dc0b98
added growth module (quite static and limited implementation)
meillo@marmaro.de
parents:
6
diff
changeset
|
56 ${NAME}: bin/clock bin/weather bin/environment bin/growth |
5 | 57 |
58 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
59 .PHONY: car |
5 | 60 car: clean all |
61 | |
62 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
63 .PHONY: strip |
5 | 64 strip: ${NAME} |
65 @echo stripping | |
66 @strip bin/* | |
67 | |
68 | |
10
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
69 .PHONY: changelog |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
70 changelog: |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
71 @echo generating changelog from mercurial log |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
72 @hg log -v --style changelog > ChangeLog |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
73 |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
74 |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
75 .PHONY: clean |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
76 clean: |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
77 rm -f *.o |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
78 rm -f bin/* |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
79 |
13c6828bd4a5
switched from mysql to sqlite; (+ some cleanups)
meillo@marmaro.de
parents:
7
diff
changeset
|
80 |
5 | 81 #dist: build changelog |
82 #@echo "generating tarball" | |
83 #@mkdir -p ${NV} | |
84 #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV} | |
85 #@fakeroot tar -czhof ${NV}.tar.gz ${NV} | |
86 #@rm -rf ${NV} |