db_bridge/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:58:07 +0100
changeset 15 5a0ca1f9a2f1
parent 12 9f0ce4eaa1ce
child 17 b3731a25b9ec
permissions -rw-r--r--
db_bridge acts as an interactive sql monitor 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 *~
	rm -f $(TARGET)