#==============================================================================
# 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     = JdbcOdbc

#---| 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 install
clean:
         @if exist *.err       del *.err
         @if exist *.i         del *.i
delete:  clean
         @if exist *.htm       del *.htm
         @if exist *.inf       del *.inf
         @if exist $(NAME).ipf del $(NAME).ipf
delete_all: delete
install:
         if exist ..\..\doc\$(NAME).htm del ..\..\doc\$(NAME).htm
         if exist ..\..\doc\$(NAME).inf del ..\..\doc\$(NAME).inf
         if exist ..\..\doc\images\*.gif del ..\..\doc\images\*.gif
         copy /b $(NAME).htm ..\..\doc\$(NAME).htm
         copy /b $(NAME).inf ..\..\doc\$(NAME).inf
         copy /b images\*.gif ..\..\doc\images\*.gif
view:    $(NAME).inf
         @$(INF) $(NAME).inf

#--------| inference rules |---------------------------------------------------
.SUFFIXES: .htm .inf .ipf
.ipf.htm:
         @cd ..\..\..\os2_tool
         @convert ..\java\src\doc\$(NAME)
         @cd ..\java\src\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

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