# _____       _    _    Corso   Italia,  178
# (_|__   .  (_   |_|_  56125           Pisa
# (_|_) |)|(()_)()| |   tel.  +39  050 46380
#   |   |               picosoft@picosoft.it

#  Copyright (C) Picosoft s.r.l. 1994-2002

#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.

#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.

#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

CCPP=g++
CC=gcc
# CFLAGS=-DAIX4
CFLAGS=-O
INCL=-I../inc -I../sqlengine -I../picoiiop -I../picocpp

OBJS=odbccom.o odbctype.o connect.o results.o execute.o options.o prepare.o \
     catalog.o sqlhndls.o  envirini.o win4unix.o dberror.o info.o
HDRS=dberror.h ../sqlengine/envirini.h sqlhndls.h
LIBPICOSQLNET=../lib/libpicosqlnet.a

$(LIBPICOSQLNET):$(OBJS)
	ar rv $(LIBPICOSQLNET) $(OBJS)

win4unix.o:../sqlengine/win4unix.cpp $(HDRS)
	$(CC) -c $(INCL) $(CFLAGS) ../sqlengine/win4unix.cpp

envirini.o:../sqlengine/envirini.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) ../sqlengine/envirini.cpp

odbccom.o:../iiopsql/odbccom.c $(HDRS)
	$(CC) -c $(INCL) $(CFLAGS) ../iiopsql/odbccom.c

odbctype.o:../iiopsql/odbctype.c $(HDRS)
	$(CC) -c $(INCL) $(CFLAGS) ../iiopsql/odbctype.c

dberror.o:dberror.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) dberror.cpp

catalog.o:catalog.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) catalog.cpp

prepare.o:prepare.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) prepare.cpp

results.o:results.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) results.cpp

execute.o:execute.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) execute.cpp

options.o:options.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) options.cpp

connect.o:connect.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) connect.cpp

sqlhndls.o:sqlhndls.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) sqlhndls.cpp

info.o:info.cpp $(HDRS)
	$(CCPP) -c $(INCL) $(CFLAGS) info.cpp


clean:
	rm -f $(LIBPICOSQLNET) *.o
