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 | b1e309dc0b98 |
children | 8db6497d6065 |
line source
1 # garten by meillo@marmaro.de
4 NAME=garten
5 # extracts VERSION from the sources
6 #VERSION=$(shell cat *.c | sed -n '/define VERSION/ s/.*"\([^"]*\)".*/\1/p' )
7 #NV=${NAME}-${VERSION}
9 #DOCS=LICENSE README ChangeLog TODO examples
11 # paths
12 #PREFIX = /usr
13 #BINDIR = ${PREFIX}/bin
14 #MANDIR = ${PREFIX}/share/man
16 # compile env
17 CC = gcc
18 LD = ${CC}
19 DEBUG = -g
20 CFLAGS = -Wall -c ${DEBUG}
21 LDFLAGS = -Wall ${DEBUG} -lsqlite3
23 # files
24 DEP = db.h game.h
27 .PHONY: all
28 all: options build
30 .PHONY: options
31 options:
32 @echo build options:
33 @echo "CC = ${CC}"
34 @echo "LD = ${LD}"
35 @echo "CFLAGS = ${CFLAGS}"
36 @echo "LDFLAGS = ${LDFLAGS}"
37 @echo
40 .PHONY: build
41 build: options ${NAME}
43 bin/clock: clock.c $(DEP)
44 $(CC) -o $@ $(LDFLAGS) clock.c
46 bin/weather: weather.c $(DEP)
47 $(CC) -o $@ $(LDFLAGS) weather.c
49 bin/environment: environment.c $(DEP)
50 $(CC) -o $@ $(LDFLAGS) environment.c
52 bin/growth: growth.c $(DEP)
53 $(CC) -o $@ $(LDFLAGS) growth.c
56 ${NAME}: bin/clock bin/weather bin/environment bin/growth
59 .PHONY: car
60 car: clean all
63 .PHONY: strip
64 strip: ${NAME}
65 @echo stripping
66 @strip bin/*
69 .PHONY: changelog
70 changelog:
71 @echo generating changelog from mercurial log
72 @hg log -v --style changelog > ChangeLog
75 .PHONY: clean
76 clean:
77 rm -f *.o
78 rm -f bin/*
81 #dist: build changelog
82 #@echo "generating tarball"
83 #@mkdir -p ${NV}
84 #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV}
85 #@fakeroot tar -czhof ${NV}.tar.gz ${NV}
86 #@rm -rf ${NV}