author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Fri, 19 Nov 2010 16:43:20 +0100 | |
changeset 161 | 36f763c8ab16 |
parent 66 | 2b4f786d9073 |
permissions | -rw-r--r-- |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
1 |
CC = g++ |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
2 |
CFLAGS = -Wall -O2 -ansi -Iinclude |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
3 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
4 |
TARGET += mysql_db |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
5 |
TARGET += postgresql_db |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
6 |
|
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
7 |
OBJECTS = main.o |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
20
diff
changeset
|
8 |
OBJECTS += console.o |
20
5fec678f931b
getpass for windows does not work
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
17
diff
changeset
|
9 |
|
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
10 |
.SUFFIXES: .cpp |
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 |
.cpp.o: |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
13 |
$(CC) -c $(CFLAGS) $< |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
14 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
15 |
all: $(TARGET) |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
16 |
|
20
5fec678f931b
getpass for windows does not work
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
17
diff
changeset
|
17 |
mysql_db: mysql_db.o $(OBJECTS) |
5fec678f931b
getpass for windows does not work
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
17
diff
changeset
|
18 |
$(CC) $< $(OBJECTS) -lmysqlclient -o $@ |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
19 |
rm -f main.o |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
20 |
|
20
5fec678f931b
getpass for windows does not work
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
17
diff
changeset
|
21 |
postgresql_db: postgresql_db.o $(OBJECTS) |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
22 |
$(CC) -c $(CFLAGS) -DWITH_POSTGRESQL main.cpp |
20
5fec678f931b
getpass for windows does not work
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
17
diff
changeset
|
23 |
$(CC) $< $(OBJECTS) -lpq -o $@ |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
24 |
rm -f main.o |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
25 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
26 |
.PHONY: clean |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
27 |
|
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
28 |
clean: |
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
29 |
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
|
30 |
rm -f *~ include/*~ |
12
9f0ce4eaa1ce
I added a small db_bridge to the repository
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
diff
changeset
|
31 |
rm -f $(TARGET) |