garten

view Makefile @ 8:9bd0a2100694

new weather implementation
author meillo@marmaro.de
date Mon, 26 May 2008 23:25:36 +0200
parents e3679f888813
children 13c6828bd4a5
line source
1 # garten by meillo@marmaro.de
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}
9 #DOCS=LICENSE README ChangeLog TODO examples
11 # paths
12 #PREFIX = /usr
13 #BINDIR = ${PREFIX}/bin
14 #MANDIR = ${PREFIX}/share/man
16 # compile env
17 CC = gcc
18 LD = ${CC}
19 DEBUG = -g
20 CFLAGS = -Wall -c ${DEBUG}
21 LDFLAGS = -Wall ${DEBUG}
23 # files
24 #SRC=baum.c actions.c
25 #OBJ=$(SRC:.c=.o)
26 #DEP = baum.h
30 all: options build
32 options:
33 @echo build options:
34 @echo "CC = ${CC}"
35 @echo "LD = ${LD}"
36 @echo "CFLAGS = ${CFLAGS}"
37 @echo "LDFLAGS = ${LDFLAGS}"
38 @echo
41 build: options ${NAME}
43 bin/clock: clock.c db.h game.h
44 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs`
46 bin/weather: weather.c db.h game.h
47 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs`
49 bin/environment: environment.c db.h game.h
50 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` environment.c `mysql_config --libs`
52 bin/growth: growth.c db.h game.h
53 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` growth.c `mysql_config --libs`
56 ${NAME}: bin/clock bin/weather bin/environment bin/growth
59 #${OBJ}: ${DEP}
62 car: clean all
65 #debug: all
66 #gdb ${NAME}
69 strip: ${NAME}
70 @echo stripping
71 @strip bin/*
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}
82 changelog:
83 @echo generating changelog from mercurial log
84 @hg log -v --style changelog > ChangeLog
87 clean:
88 rm -f *.o
91 realclean: clean
92 rm -f bin/*
95 .PHONY: all dist deb changelog clean distclean debclean build install uninstall