I have improved the connection info and cleaned something up.
committer: Markus Bröker <mbroeker@largo.homelinux.org>
CC=g++
CFLAGS=-Wall -O2 -ansi -Iinclude
TARGET=\
mysql_db \
postgresql_db
.SUFFIXES: .cpp
.cpp.o:
$(CC) -c $(CFLAGS) $<
all: $(TARGET)
mysql_db: mysql_db.o main.o
$(CC) $< main.o -lmysqlclient -o $@
rm -f main.o
postgresql_db: postgresql_db.o main.cpp
$(CC) -c $(CFLAGS) -DWITH_POSTGRESQL main.cpp
$(CC) $< main.o -lpq -o $@
rm -f main.o
.PHONY: clean
clean:
rm -f *.o;
rm -f *~ include/*~
rm -f $(TARGET)