garten

changeset 10:13c6828bd4a5

switched from mysql to sqlite; (+ some cleanups)
author meillo@marmaro.de
date Wed, 23 Jul 2008 11:40:45 +0200
parents ac67f688ed2e
children 176ee28e7464
files Makefile
diffstat 1 files changed, 27 insertions(+), 36 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Wed Jul 23 11:39:15 2008 +0200
     1.2 +++ b/Makefile	Wed Jul 23 11:40:45 2008 +0200
     1.3 @@ -18,17 +18,16 @@
     1.4  LD = ${CC}
     1.5  DEBUG = -g
     1.6  CFLAGS = -Wall -c ${DEBUG}
     1.7 -LDFLAGS = -Wall ${DEBUG}
     1.8 +LDFLAGS = -Wall ${DEBUG} -lsqlite3
     1.9  
    1.10  # files
    1.11 -#SRC=baum.c actions.c
    1.12 -#OBJ=$(SRC:.c=.o)
    1.13 -#DEP = baum.h
    1.14 +DEP = db.h game.h
    1.15  
    1.16  
    1.17 -
    1.18 +.PHONY: all
    1.19  all: options build
    1.20  
    1.21 +.PHONY: options
    1.22  options:
    1.23  	@echo build options:
    1.24  	@echo "CC     = ${CC}"
    1.25 @@ -38,58 +37,50 @@
    1.26  	@echo
    1.27  
    1.28  
    1.29 +.PHONY: build
    1.30  build: options ${NAME}
    1.31  
    1.32 -bin/clock: clock.c db.h game.h
    1.33 -	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs`
    1.34 +bin/clock: clock.c $(DEP)
    1.35 +	$(CC) -o $@ $(LDFLAGS) clock.c
    1.36  
    1.37 -bin/weather: weather.c db.h game.h
    1.38 -	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs`
    1.39 +bin/weather: weather.c $(DEP)
    1.40 +	$(CC) -o $@ $(LDFLAGS) weather.c
    1.41  
    1.42 -bin/environment: environment.c db.h game.h
    1.43 -	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` environment.c `mysql_config --libs`
    1.44 +bin/environment: environment.c $(DEP)
    1.45 +	$(CC) -o $@ $(LDFLAGS) environment.c
    1.46  
    1.47 -bin/growth: growth.c db.h game.h
    1.48 -	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` growth.c `mysql_config --libs`
    1.49 +bin/growth: growth.c $(DEP)
    1.50 +	$(CC) -o $@ $(LDFLAGS) growth.c
    1.51  
    1.52  
    1.53  ${NAME}: bin/clock bin/weather bin/environment bin/growth
    1.54  
    1.55  
    1.56 -#${OBJ}: ${DEP}
    1.57 -
    1.58 -
    1.59 +.PHONY: car
    1.60  car: clean all
    1.61  
    1.62  
    1.63 -#debug: all
    1.64 -#gdb ${NAME}
    1.65 -
    1.66 -
    1.67 +.PHONY: strip
    1.68  strip: ${NAME}
    1.69  	@echo stripping
    1.70  	@strip bin/*
    1.71  
    1.72  
    1.73 +.PHONY: changelog
    1.74 +changelog:
    1.75 +	@echo generating changelog from mercurial log
    1.76 +	@hg log -v --style changelog > ChangeLog
    1.77 +
    1.78 +
    1.79 +.PHONY: clean
    1.80 +clean:
    1.81 +	rm -f *.o
    1.82 +	rm -f bin/*
    1.83 +
    1.84 +
    1.85  #dist: build changelog
    1.86  #@echo "generating tarball"
    1.87  #@mkdir -p ${NV}
    1.88  #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV}
    1.89  #@fakeroot tar -czhof ${NV}.tar.gz ${NV}
    1.90  #@rm -rf ${NV}
    1.91 -
    1.92 -
    1.93 -changelog:
    1.94 -	@echo generating changelog from mercurial log
    1.95 -	@hg log -v --style changelog > ChangeLog
    1.96 -
    1.97 -
    1.98 -clean:
    1.99 -	rm -f *.o
   1.100 -
   1.101 -
   1.102 -realclean: clean
   1.103 -	rm -f bin/*
   1.104 -
   1.105 -
   1.106 -.PHONY: all dist deb changelog clean distclean debclean build install uninstall