--- mercury-extras-0.12.2.orig/odbc/Mmakefile 2003-01-16 23:44:21.000000000 +1300 +++ mercury-extras-0.12.2/odbc/Mmakefile 2006-03-26 17:23:25.000000000 +1200 @@ -37,16 +37,18 @@ ODBC_INCL_DIR=$(ODBC_SDK_DIR)/include MLLIBS=-lodbc32 else - ODBC_LIB_DIR=$(IODBC_DIR)/lib - ODBC_INCL_DIR=$(IODBC_DIR)/include + ODBC_LIBS=`iodbc-config --libs` + ODBC_INCLS=`iodbc-config --cflags` # note: on a DEC Alpha using OSF1 remove the -ldl. - MLLIBS=-L$(ODBC_LIB_DIR) -R$(ODBC_LIB_DIR) -liodbc -ldl + MLLIBS=-$(ODBC_LIBS) -lpthread -ldl endif -MAIN_TARGET=odbc_test +MAIN_TARGET=libodbc .PHONY: depend -depend: odbc_test.depend +depend: odbc.depend + +install: libodbc.install .PHONY: check check: @@ -57,7 +59,7 @@ # `--no-ansi' is needed because the ODBC header files include C++-style # "//" comments. `--no-ansi' allows recognition of C++-style "//" comments, # presuming you have gcc version 2.7.1 or greater. -MGNUCFLAGS=--no-ansi -D$(MODBC_DRIVER) -D$(MODBC_DB) -I$(ODBC_INCL_DIR) +MGNUCFLAGS=-D$(MODBC_DRIVER) -D$(MODBC_DB) $(ODBC_INCLS) #-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#