garten
annotate 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 |
rev | line source |
---|---|
meillo@5 | 1 # garten by meillo@marmaro.de |
meillo@5 | 2 |
meillo@5 | 3 |
meillo@5 | 4 NAME=garten |
meillo@5 | 5 # extracts VERSION from the sources |
meillo@5 | 6 #VERSION=$(shell cat *.c | sed -n '/define VERSION/ s/.*"\([^"]*\)".*/\1/p' ) |
meillo@5 | 7 #NV=${NAME}-${VERSION} |
meillo@5 | 8 |
meillo@5 | 9 #DOCS=LICENSE README ChangeLog TODO examples |
meillo@5 | 10 |
meillo@5 | 11 # paths |
meillo@5 | 12 #PREFIX = /usr |
meillo@5 | 13 #BINDIR = ${PREFIX}/bin |
meillo@5 | 14 #MANDIR = ${PREFIX}/share/man |
meillo@5 | 15 |
meillo@5 | 16 # compile env |
meillo@5 | 17 CC = gcc |
meillo@5 | 18 LD = ${CC} |
meillo@5 | 19 DEBUG = -g |
meillo@5 | 20 CFLAGS = -Wall -c ${DEBUG} |
meillo@5 | 21 LDFLAGS = -Wall ${DEBUG} |
meillo@5 | 22 |
meillo@5 | 23 # files |
meillo@5 | 24 #SRC=baum.c actions.c |
meillo@5 | 25 #OBJ=$(SRC:.c=.o) |
meillo@5 | 26 #DEP = baum.h |
meillo@5 | 27 |
meillo@5 | 28 |
meillo@5 | 29 |
meillo@5 | 30 all: options build |
meillo@5 | 31 |
meillo@5 | 32 options: |
meillo@5 | 33 @echo build options: |
meillo@5 | 34 @echo "CC = ${CC}" |
meillo@5 | 35 @echo "LD = ${LD}" |
meillo@5 | 36 @echo "CFLAGS = ${CFLAGS}" |
meillo@5 | 37 @echo "LDFLAGS = ${LDFLAGS}" |
meillo@5 | 38 @echo |
meillo@5 | 39 |
meillo@5 | 40 |
meillo@5 | 41 build: options ${NAME} |
meillo@5 | 42 |
meillo@5 | 43 bin/clock: clock.c db.h game.h |
meillo@5 | 44 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs` |
meillo@5 | 45 |
meillo@5 | 46 bin/weather: weather.c db.h game.h |
meillo@5 | 47 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs` |
meillo@5 | 48 |
meillo@6 | 49 bin/environment: environment.c db.h game.h |
meillo@6 | 50 $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` environment.c `mysql_config --libs` |
meillo@5 | 51 |
meillo@6 | 52 |
meillo@6 | 53 ${NAME}: bin/clock bin/weather bin/environment |
meillo@5 | 54 |
meillo@5 | 55 |
meillo@5 | 56 #${OBJ}: ${DEP} |
meillo@5 | 57 |
meillo@5 | 58 |
meillo@5 | 59 car: clean all |
meillo@5 | 60 |
meillo@5 | 61 |
meillo@5 | 62 #debug: all |
meillo@5 | 63 #gdb ${NAME} |
meillo@5 | 64 |
meillo@5 | 65 |
meillo@5 | 66 strip: ${NAME} |
meillo@5 | 67 @echo stripping |
meillo@5 | 68 @strip bin/* |
meillo@5 | 69 |
meillo@5 | 70 |
meillo@5 | 71 #dist: build changelog |
meillo@5 | 72 #@echo "generating tarball" |
meillo@5 | 73 #@mkdir -p ${NV} |
meillo@5 | 74 #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV} |
meillo@5 | 75 #@fakeroot tar -czhof ${NV}.tar.gz ${NV} |
meillo@5 | 76 #@rm -rf ${NV} |
meillo@5 | 77 |
meillo@5 | 78 |
meillo@5 | 79 changelog: |
meillo@5 | 80 @echo generating changelog from mercurial log |
meillo@5 | 81 @hg log -v --style changelog > ChangeLog |
meillo@5 | 82 |
meillo@5 | 83 |
meillo@5 | 84 clean: |
meillo@5 | 85 rm -f *.o |
meillo@5 | 86 |
meillo@5 | 87 |
meillo@5 | 88 realclean: clean |
meillo@5 | 89 rm -f bin/* |
meillo@5 | 90 |
meillo@5 | 91 |
meillo@5 | 92 .PHONY: all dist deb changelog clean distclean debclean build install uninstall |