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