Mercurial > garten
annotate Makefile @ 7:b1e309dc0b98
added growth module (quite static and limited implementation)
author | meillo@marmaro.de |
---|---|
date | Thu, 15 May 2008 21:42:01 +0200 |
parents | e3679f888813 |
children | 13c6828bd4a5 |
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} | |
21 LDFLAGS = -Wall ${DEBUG} | |
22 | |
23 # files | |
24 #SRC=baum.c actions.c | |
25 #OBJ=$(SRC:.c=.o) | |
26 #DEP = baum.h | |
27 | |
28 | |
29 | |
30 all: options build | |
31 | |
32 options: | |
33 @echo build options: | |
34 @echo "CC = ${CC}" | |
35 @echo "LD = ${LD}" | |
36 @echo "CFLAGS = ${CFLAGS}" | |
37 @echo "LDFLAGS = ${LDFLAGS}" | |
38 @echo | |
39 | |
40 | |
41 build: options ${NAME} | |
42 | |
43 bin/clock: clock.c db.h game.h | |
44 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs` | |
45 | |
46 bin/weather: weather.c db.h game.h | |
47 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs` | |
48 | |
6
e3679f888813
added environment module (only static code)
meillo@marmaro.de
parents:
5
diff
changeset
|
49 bin/environment: environment.c db.h game.h |
e3679f888813
added environment module (only static code)
meillo@marmaro.de
parents:
5
diff
changeset
|
50 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` environment.c `mysql_config --libs` |
5 | 51 |
7
b1e309dc0b98
added growth module (quite static and limited implementation)
meillo@marmaro.de
parents:
6
diff
changeset
|
52 bin/growth: growth.c db.h game.h |
b1e309dc0b98
added growth module (quite static and limited implementation)
meillo@marmaro.de
parents:
6
diff
changeset
|
53 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` growth.c `mysql_config --libs` |
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 | |
59 #${OBJ}: ${DEP} | |
60 | |
61 | |
62 car: clean all | |
63 | |
64 | |
65 #debug: all | |
66 #gdb ${NAME} | |
67 | |
68 | |
69 strip: ${NAME} | |
70 @echo stripping | |
71 @strip bin/* | |
72 | |
73 | |
74 #dist: build changelog | |
75 #@echo "generating tarball" | |
76 #@mkdir -p ${NV} | |
77 #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV} | |
78 #@fakeroot tar -czhof ${NV}.tar.gz ${NV} | |
79 #@rm -rf ${NV} | |
80 | |
81 | |
82 changelog: | |
83 @echo generating changelog from mercurial log | |
84 @hg log -v --style changelog > ChangeLog | |
85 | |
86 | |
87 clean: | |
88 rm -f *.o | |
89 | |
90 | |
91 realclean: clean | |
92 rm -f bin/* | |
93 | |
94 | |
95 .PHONY: all dist deb changelog clean distclean debclean build install uninstall |