db_bridge/Makefile
changeset 12 9f0ce4eaa1ce
child 17 b3731a25b9ec
equal deleted inserted replaced
11:0a8be4eac87e 12:9f0ce4eaa1ce
       
     1 CC=g++
       
     2 CFLAGS=-Wall -O2 -ansi -Iinclude
       
     3 TARGET=\
       
     4 	mysql_db \
       
     5 	postgresql_db
       
     6 
       
     7 .SUFFIXES: .cpp
       
     8 
       
     9 .cpp.o:
       
    10 	$(CC) -c $(CFLAGS) $<
       
    11 
       
    12 all: $(TARGET)
       
    13 
       
    14 mysql_db: mysql_db.o main.o
       
    15 	$(CC) $< main.o -lmysqlclient -o $@
       
    16 	rm -f main.o
       
    17 
       
    18 postgresql_db: postgresql_db.o main.cpp
       
    19 	$(CC) -c $(CFLAGS) -DWITH_POSTGRESQL main.cpp
       
    20 	$(CC) $< main.o -lpq -o $@
       
    21 	rm -f main.o
       
    22 
       
    23 .PHONY: clean
       
    24 
       
    25 clean:
       
    26 	rm -f *.o;
       
    27 	rm -f *~
       
    28 	rm -f $(TARGET)