db_bridge/Makefile
author Markus Bröker <mbroeker@largo.dyndns.tv>
Sat, 13 Dec 2008 17:58:05 +0100
changeset 12 9f0ce4eaa1ce
child 17 b3731a25b9ec
permissions -rw-r--r--
I added a small db_bridge to the repository 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;
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    27
	rm -f *~
9f0ce4eaa1ce I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff changeset
    28
	rm -f $(TARGET)