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@5: LDFLAGS = -Wall ${DEBUG} meillo@5: meillo@5: # files meillo@5: #SRC=baum.c actions.c meillo@5: #OBJ=$(SRC:.c=.o) meillo@5: #DEP = baum.h meillo@5: meillo@5: meillo@5: meillo@5: all: options build meillo@5: 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@5: build: options ${NAME} meillo@5: meillo@5: bin/clock: clock.c db.h game.h meillo@5: $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs` meillo@5: meillo@5: bin/weather: weather.c db.h game.h meillo@5: $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs` meillo@5: meillo@5: meillo@5: ${NAME}: bin/clock bin/weather meillo@5: meillo@5: meillo@5: #${OBJ}: ${DEP} meillo@5: meillo@5: meillo@5: car: clean all meillo@5: meillo@5: meillo@5: #debug: all meillo@5: #gdb ${NAME} meillo@5: meillo@5: meillo@5: strip: ${NAME} meillo@5: @echo stripping meillo@5: @strip bin/* meillo@5: meillo@5: 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} meillo@5: meillo@5: meillo@5: changelog: meillo@5: @echo generating changelog from mercurial log meillo@5: @hg log -v --style changelog > ChangeLog meillo@5: meillo@5: meillo@5: clean: meillo@5: rm -f *.o meillo@5: meillo@5: meillo@5: realclean: clean meillo@5: rm -f bin/* meillo@5: meillo@5: meillo@5: .PHONY: all dist deb changelog clean distclean debclean build install uninstall