garten
diff Makefile @ 5:26ca6c79fc22
added a Makefile (which needs improvement)
author | meillo@marmaro.de |
---|---|
date | Wed, 14 May 2008 21:10:45 +0200 |
parents | |
children | e3679f888813 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Wed May 14 21:10:45 2008 +0200 1.3 @@ -0,0 +1,89 @@ 1.4 +# garten by meillo@marmaro.de 1.5 + 1.6 + 1.7 +NAME=garten 1.8 +# extracts VERSION from the sources 1.9 +#VERSION=$(shell cat *.c | sed -n '/define VERSION/ s/.*"\([^"]*\)".*/\1/p' ) 1.10 +#NV=${NAME}-${VERSION} 1.11 + 1.12 +#DOCS=LICENSE README ChangeLog TODO examples 1.13 + 1.14 +# paths 1.15 +#PREFIX = /usr 1.16 +#BINDIR = ${PREFIX}/bin 1.17 +#MANDIR = ${PREFIX}/share/man 1.18 + 1.19 +# compile env 1.20 +CC = gcc 1.21 +LD = ${CC} 1.22 +DEBUG = -g 1.23 +CFLAGS = -Wall -c ${DEBUG} 1.24 +LDFLAGS = -Wall ${DEBUG} 1.25 + 1.26 +# files 1.27 +#SRC=baum.c actions.c 1.28 +#OBJ=$(SRC:.c=.o) 1.29 +#DEP = baum.h 1.30 + 1.31 + 1.32 + 1.33 +all: options build 1.34 + 1.35 +options: 1.36 + @echo build options: 1.37 + @echo "CC = ${CC}" 1.38 + @echo "LD = ${LD}" 1.39 + @echo "CFLAGS = ${CFLAGS}" 1.40 + @echo "LDFLAGS = ${LDFLAGS}" 1.41 + @echo 1.42 + 1.43 + 1.44 +build: options ${NAME} 1.45 + 1.46 +bin/clock: clock.c db.h game.h 1.47 + $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs` 1.48 + 1.49 +bin/weather: weather.c db.h game.h 1.50 + $(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs` 1.51 + 1.52 + 1.53 +${NAME}: bin/clock bin/weather 1.54 + 1.55 + 1.56 +#${OBJ}: ${DEP} 1.57 + 1.58 + 1.59 +car: clean all 1.60 + 1.61 + 1.62 +#debug: all 1.63 +#gdb ${NAME} 1.64 + 1.65 + 1.66 +strip: ${NAME} 1.67 + @echo stripping 1.68 + @strip bin/* 1.69 + 1.70 + 1.71 +#dist: build changelog 1.72 +#@echo "generating tarball" 1.73 +#@mkdir -p ${NV} 1.74 +#@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV} 1.75 +#@fakeroot tar -czhof ${NV}.tar.gz ${NV} 1.76 +#@rm -rf ${NV} 1.77 + 1.78 + 1.79 +changelog: 1.80 + @echo generating changelog from mercurial log 1.81 + @hg log -v --style changelog > ChangeLog 1.82 + 1.83 + 1.84 +clean: 1.85 + rm -f *.o 1.86 + 1.87 + 1.88 +realclean: clean 1.89 + rm -f bin/* 1.90 + 1.91 + 1.92 +.PHONY: all dist deb changelog clean distclean debclean build install uninstall