#----------------------------------------------------------------------------
# ObjectWindows
# Copyright (c) 1991, 1995 by Borland International, All Rights Reserved
#
# Use: MODEL=l or MODEL=f to build static library OWL example
#  MODEL d builds DLL example with additional C calling EXE
#  Default is MODEL=f
#
#----------------------------------------------------------------------------

# This makefile can be used to build three different exes
# MAKE MODEL=l or f will build an cctltest.exe with the dialog
# static linked
#
# MAKE MODEL=d will build the color dialog in colordlg.dll and will build
# cctltest.exe and usecdll.exe.
# cctltest.exe is an owl program that calls the dll to display the dialog.
# usecdll2.exe is a C program that calls the dll to display the dialog

!if !$d(MODEL)
MODEL=f
!endif

#
# This builds the static example
#
!if $(MODEL)!=d
EXE    = cctltest
OBJEXE = cctltest.obj colordlg.obj
RESEXE = cctltest.res colordlg.res

#
# This builds the dll examples
#
!else

EXEALL = cctltest.exe usecdll2.exe

EXERES = usecdll2  # pick this target to generate sample rule, then substitute

#
# These declarations are required in order to build 32bit versions of the
# example This define is used when using the DLL to generate _import
# declarations
#
CCFEXE = -DUSEEXAMPLEDLL

# This define is used when building the DLL to generate _export declarations
#
CCFDLL = -DBUILDEXAMPLEDLL

LIBEXE = colordlg.lib
DLLRES = colordlg
EXEMAKE= $(CCTLTEST) $(USECDLL2)
CCTLTEST = $(EXERULE:usecdll2=cctltest)
USECDLL2 = $(EXERULE:usecdll2.res=cctltest.res)
!endif

!include $(BCEXAMPLEDIR)\owlmake.gen
