Mercurial > garten
view 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 |
line wrap: on
line source
# garten by meillo@marmaro.de NAME=garten # extracts VERSION from the sources #VERSION=$(shell cat *.c | sed -n '/define VERSION/ s/.*"\([^"]*\)".*/\1/p' ) #NV=${NAME}-${VERSION} #DOCS=LICENSE README ChangeLog TODO examples # paths #PREFIX = /usr #BINDIR = ${PREFIX}/bin #MANDIR = ${PREFIX}/share/man # compile env CC = gcc LD = ${CC} DEBUG = -g CFLAGS = -Wall -c ${DEBUG} LDFLAGS = -Wall ${DEBUG} -lsqlite3 # files DEP = db.h game.h .PHONY: all all: options build .PHONY: options options: @echo build options: @echo "CC = ${CC}" @echo "LD = ${LD}" @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo .PHONY: build build: options ${NAME} bin/clock: clock.c $(DEP) $(CC) -o $@ $(LDFLAGS) clock.c bin/weather: weather.c $(DEP) $(CC) -o $@ $(LDFLAGS) weather.c bin/environment: environment.c $(DEP) $(CC) -o $@ $(LDFLAGS) environment.c bin/growth: growth.c $(DEP) $(CC) -o $@ $(LDFLAGS) growth.c ${NAME}: bin/clock bin/weather bin/environment bin/growth .PHONY: car car: clean all .PHONY: strip strip: ${NAME} @echo stripping @strip bin/* .PHONY: changelog changelog: @echo generating changelog from mercurial log @hg log -v --style changelog > ChangeLog .PHONY: clean clean: rm -f *.o rm -f bin/* #dist: build changelog #@echo "generating tarball" #@mkdir -p ${NV} #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV} #@fakeroot tar -czhof ${NV}.tar.gz ${NV} #@rm -rf ${NV}