#==============================================================================
# Makefile
#
# OS/2 Makefile for use with IBM C/C++ Set/2 to build the CLI for mSQL
#
# (c) 1997 by Dirk Ohme - all rights reserved
#==============================================================================
# includes
#==============================================================================
include ..\Config.mk
include ..\Version.mk
#==============================================================================

#---| definitions |------------------------------------------------------------
NAME     = iodbc

#---| pre-compiler |-----------------------------------------------------------
!ifndef BCPP
!  ifdef VACPP
PC       = $(CC) /P+ /Pc+ /Pd- /Pe+ /Q
!  else
PC       = $(CC) /P+ /Pc+ /Pd- /Pe+ /Q
!  endif
!else
PC       = $(CC) /P+ /Pc+ /Pd- /Pe+ /Q
!endif

#---| online help compiler |---------------------------------------------------
IPF      = ipfc /inf
INF      = view

#---| global dependencies |----------------------------------------------------
all:     $(NAME).inf $(NAME).htm
clean:
delete:  clean
delete_all: delete
         @if exist *.err       del *.err
         @if exist *.htm       del *.htm
         @if exist *.i         del *.i
         @if exist *.inf       del *.inf
         @if exist $(NAME).ipf del $(NAME).ipf
view:    $(NAME).inf
         @$(INF) $(NAME).inf

#--------| inference rules |---------------------------------------------------
.SUFFIXES: .htm .inf .ipf
.ipf.htm:
         @cd ..\os2_tool
         @convert ..\doc\$(NAME)
         @cd ..\doc
.ipf.inf:
         @$(IPF) $*.ipf

#---| local dependencies |-----------------------------------------------------
$(NAME).htm:       $(NAME).ipf
$(NAME).inf:       $(NAME).ipf
$(NAME).ipf:       main.ipf
        @if exist $(NAME).ipf  del $(NAME).ipf
        -@$(PC) /DVERSION=\"$(VERSION)$(EXTVER)\" main.ipf 2>&1 > main.err
        @ren main.i $(NAME).ipf

#==============================================================================
