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 wrap: on
line diff
--- a/Makefile	Wed Jul 23 11:39:15 2008 +0200
+++ b/Makefile	Wed Jul 23 11:40:45 2008 +0200
@@ -18,17 +18,16 @@
 LD = ${CC}
 DEBUG = -g
 CFLAGS = -Wall -c ${DEBUG}
-LDFLAGS = -Wall ${DEBUG}
+LDFLAGS = -Wall ${DEBUG} -lsqlite3
 
 # files
-#SRC=baum.c actions.c
-#OBJ=$(SRC:.c=.o)
-#DEP = baum.h
+DEP = db.h game.h
 
 
-
+.PHONY: all
 all: options build
 
+.PHONY: options
 options:
 	@echo build options:
 	@echo "CC     = ${CC}"
@@ -38,58 +37,50 @@
 	@echo
 
 
+.PHONY: build
 build: options ${NAME}
 
-bin/clock: clock.c db.h game.h
-	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` clock.c `mysql_config --libs`
+bin/clock: clock.c $(DEP)
+	$(CC) -o $@ $(LDFLAGS) clock.c
 
-bin/weather: weather.c db.h game.h
-	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` weather.c `mysql_config --libs`
+bin/weather: weather.c $(DEP)
+	$(CC) -o $@ $(LDFLAGS) weather.c
 
-bin/environment: environment.c db.h game.h
-	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` environment.c `mysql_config --libs`
+bin/environment: environment.c $(DEP)
+	$(CC) -o $@ $(LDFLAGS) environment.c
 
-bin/growth: growth.c db.h game.h
-	$(CC) -o $@ $(LDFLAGS) `mysql_config --cflags` growth.c `mysql_config --libs`
+bin/growth: growth.c $(DEP)
+	$(CC) -o $@ $(LDFLAGS) growth.c
 
 
 ${NAME}: bin/clock bin/weather bin/environment bin/growth
 
 
-#${OBJ}: ${DEP}
-
-
+.PHONY: car
 car: clean all
 
 
-#debug: all
-#gdb ${NAME}
-
-
+.PHONY: strip
 strip: ${NAME}
 	@echo stripping
 	@strip bin/*
 
 
+.PHONY: changelog
+changelog:
+	@echo generating changelog from mercurial log
+	@hg log -v --style changelog > ChangeLog
+
+
+.PHONY: clean
+clean:
+	rm -f *.o
+	rm -f bin/*
+
+
 #dist: build changelog
 #@echo "generating tarball"
 #@mkdir -p ${NV}
 #@cp -rf ${SRC} ${DEP} ${NAME}.1 Makefile ${DOCS} ${NV}
 #@fakeroot tar -czhof ${NV}.tar.gz ${NV}
 #@rm -rf ${NV}
-
-
-changelog:
-	@echo generating changelog from mercurial log
-	@hg log -v --style changelog > ChangeLog
-
-
-clean:
-	rm -f *.o
-
-
-realclean: clean
-	rm -f bin/*
-
-
-.PHONY: all dist deb changelog clean distclean debclean build install uninstall