db_bridge/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:58:09 +0100
changeset 17 b3731a25b9ec
parent 12 9f0ce4eaa1ce
child 20 5fec678f931b
permissions -rw-r--r--
I have improved the connection info and cleaned something up. committer: Markus Bröker <mbroeker@largo.homelinux.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     1
CC=g++
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     2
CFLAGS=-Wall -O2 -ansi -Iinclude
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     3
TARGET=\
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     4
	mysql_db \
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     5
	postgresql_db
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     6
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     7
.SUFFIXES: .cpp
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     8
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
     9
.cpp.o:
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    10
	$(CC) -c $(CFLAGS) $<
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    11
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    12
all: $(TARGET)
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    13
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    14
mysql_db: mysql_db.o main.o
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    15
	$(CC) $< main.o -lmysqlclient -o $@
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    16
	rm -f main.o
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    17
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    18
postgresql_db: postgresql_db.o main.cpp
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    19
	$(CC) -c $(CFLAGS) -DWITH_POSTGRESQL main.cpp
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    20
	$(CC) $< main.o -lpq -o $@
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    21
	rm -f main.o
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    22
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    23
.PHONY: clean
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    24
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    25
clean:
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    26
	rm -f *.o;
17
b3731a25b9ec I have improved the connection info and cleaned something up.
Markus Bröker <mbroeker@largo.dyndns.tv>
parents: 12
diff changeset
    27
	rm -f *~ include/*~
12
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
	rm -f $(TARGET)