garten

view Makefile @ 6:e3679f888813

added environment module (only static code)
author meillo@marmaro.de
date Wed, 14 May 2008 21:59:35 +0200
parents 26ca6c79fc22
children b1e309dc0b98
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`
53 ${NAME}: bin/clock bin/weather bin/environment
56 #${OBJ}: ${DEP}
59 car: clean all
62 #debug: all
63 #gdb ${NAME}
66 strip: ${NAME}
67 @echo stripping
68 @strip bin/*
71 #dist: build changelog
72 #@echo "generating tarball"
73 #@mkdir -p ${NV}
74 #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV}
75 #@fakeroot tar -czhof ${NV}.tar.gz ${NV}
76 #@rm -rf ${NV}
79 changelog:
80 @echo generating changelog from mercurial log
81 @hg log -v --style changelog > ChangeLog
84 clean:
85 rm -f *.o
88 realclean: clean
89 rm -f bin/*
92 .PHONY: all dist deb changelog clean distclean debclean build install uninstall