db_bridge/Makefile
author Markus Bröker <mbroeker@volpe.spectre.org>
Wed, 18 Aug 2010 16:17:00 +0200
changeset 142 d6bce20b455e
parent 66 2b4f786d9073
permissions -rw-r--r--
asm/decimal.c: provide a default wordsize

      CC = g++
  CFLAGS = -Wall -O2 -ansi -Iinclude

 TARGET += mysql_db
 TARGET += postgresql_db

OBJECTS  = main.o
OBJECTS += console.o

.SUFFIXES: .cpp

.cpp.o:
	$(CC) -c $(CFLAGS) $<

all: $(TARGET)

mysql_db: mysql_db.o $(OBJECTS)
	$(CC) $< $(OBJECTS) -lmysqlclient -o $@
	rm -f main.o

postgresql_db: postgresql_db.o $(OBJECTS)
	$(CC) -c $(CFLAGS) -DWITH_POSTGRESQL main.cpp
	$(CC) $< $(OBJECTS) -lpq -o $@
	rm -f main.o

.PHONY: clean

clean:
	rm -f *.o;
	rm -f *~ include/*~
	rm -f $(TARGET)