# +----------------------------------------------------------------------+ # | Aubit 4gl Language Compiler Version $.0 | # +----------------------------------------------------------------------+ # | Copyright (c) 2000-1 Aubit Development Team (See Credits file) | # +----------------------------------------------------------------------+ # | This program is free software; you can redistribute it and/or modify | # | it under the terms of one of the following licenses: | # | | # | A) the GNU General Public License as published by the Free Software | # | Foundation; either version 2 of the License, or (at your option) | # | any later version. | # | | # | B) the Aubit License as published by the Aubit Development Team and | # | included in the distribution in the file: LICENSE | # | | # | 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 both licenses referred to here. | # | If you did not, or have any questions about Aubit licensing, please | # | contact afalout@ihug.co.nz | # +----------------------------------------------------------------------+ # # $Id: Makefile.in,v 1.8 2004/03/19 11:05:27 afalout Exp $ # ROOT=../.. #All stuff common to more then one Aubit compiler make file is there: include ${ROOT}/incl/Makefile-common ## ================================================================== ## Options ## ================================================================== CFLAGS =-g -O2 DEFS-COMMON = \ -DVERSION=\"3.0.1\" \ -DSTDC_HEADERS=1 \ -DHAVE_STRERROR=1 \ -DHAVE_DLFCN_H=1 \ -DHAVE_LIBDL=1 \ -DSYS_ODBC_INI=\"/etc/odbc.ini\" \ -DSYS_ODBCINST_INI=\"/etc/odbcinst.ini\" \ -DPACKAGE=\"odbctest\" # -DPACKAGE=\"libiodbc\" DEFS_V3 =${DEFS-COMMON} -DODBCVER=0x0350 #DEFS_V2 =${DEFS1} ${DEFS2} -DVERSION2 DEFS_V2 =${DEFS-COMMON} -DODBCVER=0x0200 #define ODBCVER 0x0351 ALL =shexec #FIXME: what if we have PGODBC, IXFODBC, ODBC32 or ... instead of this? ifneq "@HAVE_UNIXODBC@" "no" ALL +=${ROOT}/bin/odbctest-unixODBC endif ifneq "@HAVE_IODBC@" "no" ifeq "@IODBC_VERSION@" "???" ALL +=${ROOT}/bin/odbctest-iodbc2 else ALL +=${ROOT}/bin/odbctest-iodbc3 endif endif ifneq "${COMSPEC}" "" ALL +=${ROOT}/bin/odbctest-odbc32 endif SOURCE =odbctest.c #to avoid missing __fpclassify for SAP DB ODBC driver, link with #math library (/usr/lib/libm.so) ADDLIBS=-lm #This scripts rely on expect and need manual mods to parameters to work: #autotest-ifx-iodbc #autotest-pg-unix #autotest-ifx-unix #autotest-pg-iodbc ## ================================================================== ## Targets ## ================================================================== all: ${ALL} @echo " " @echo "Default targets (${ALL}) compiled successfully" @echo "See examples of automated usage in autotest-* scripts." ${ROOT}/bin/odbctest-iodbc3: odbctest3.o ${CC} ${CFLAGS} -o $@ $^ @IODBC_LFLAGS@ @IODBC_LIBS@ ${ADDLIBS} ${ROOT}/bin/odbctest-iodbc2: odbctest2.o ${CC} ${CFLAGS} -o $@ $^ @IODBC_LFLAGS@ @IODBC_LIBS@ ${ADDLIBS} ${ROOT}/bin/odbctest-unixODBC: odbctest4.o ${CC} ${CFLAGS} -o $@ $^ @UNIXODBC_LFLAGS@ @UNIXODBC_LIBS@ ${ADDLIBS} ${ROOT}/bin/odbctest-odbc32: odbctest4.o ${CC} ${CFLAGS} -o $@ $^ -lodbc32 ${ADDLIBS} ## ================================================================== ## Sub Targets ## ================================================================== #FIXME: we are using this headers in ./ (-I./): #sqltypes.h sql.h sqlext.h #But we ahould be using this: #@UNIXODBC_INCLUDE@ #@IODBC_INCLUDE@ #iODBC V2: odbctest2.o: ${SOURCE} # ${CC} $(DEFS_V2) ${CFLAGS} -I.. -I./ -c ${SOURCE} -o $@ ${CC} $(DEFS_V2) ${CFLAGS} -c ${SOURCE} -o $@ -DIODBC #iODBC V3: odbctest3.o: CFLAGS:=-DIODBC @IODBC_INCLUDE@ @IODBC_LFLAGS@ ${CFLAGS_NOREDUND} ${CFLAGS} odbctest3.o: ${SOURCE} # ${CC} $(DEFS_V3) ${CFLAGS} -I.. -I./ -c ${SOURCE} -o $@ ${CC} $(DEFS_V3) ${CFLAGS} -c ${SOURCE} -o $@ -DIODBC #unixODBC: odbctest4.o: CFLAGS:=-DUNIXODBC @UNIXODBC_LFLAGS@ ${CFLAGS} odbctest4.o: ${SOURCE} ${CC} $(DEFS_V3) ${CFLAGS} -c ${SOURCE} -o $@ -DUNIXODBC shexec: chmod a+x autotest* # ${CP} ../../bin ## ================================================================== ## Clean ## ================================================================== clean: ${RM} *.o *.bak odbctest-iodbc* odbctest-unixODBC