# ----- General -------------------------------------------------------------
DEBUG=off

# ----- Usage ---------------------------------------------------------------
usage:
	@type <<

Usage:

zmake dos16      (16 bit DOS with Pharlap)
zmake dos16b     (16 bit DOS with Blinker)
zmake dos32      (32 bit DOS)
zmake win16      (16 bit Windows)
zmake win32      (32 bit Windows)
zmake win32dll   (32 bit Windows dll)
zmake vxworks    (vxWorks)
<<

# ----- Clean ---------------------------------------------------------------
clean:
	z_clean

# ----- Platforms -----------------------------------------------------------
dos16: dlgwn16.exe msgwn16.exe sclwn16.exe mdiwn16.exe win16.exe

dos16b: dlgwn1b.exe msgwn1b.exe sclwn1b.exe mdiwn1b.exe win1b.exe

dos32: dlgwn32.exe msgwn32.exe sclwn32.exe mdiwn32.exe win32.exe

win16: wdlgwn16.exe wmsgwn16.exe wsclwn16.exe wmdiwn16.exe wwin16.exe

win32: wdlgwn32.exe wmsgwn32.exe wsclwn32.exe wmdiwn32.exe wwin32.exe

win32dll: wdlgwin.exe wmsgwin.exe wsclwin.exe wmdiwin.exe wwin.exe

vxworks: vdlgwin.o vmsgwin.o vsclwin.o vmdiwin.o vwin.o

# ----- DOS16 ---------------------------------------------------------------

!if "$(ZINC_COMPILER)" == "borland"
D16_DEFINITION_FILE=b16.def
!endif

# ----- pharlap -------------------------------------------------------------
TARGET_TYPE=EXE
PLATFORM=DOS16
DEFINITION_FILE=$(D16_DEFINITION_FILE)

TARGET=dlgwn16.exe
SOURCE_FILES=dlgwin.cpp
!include <zaf.mak>

TARGET=msgwn16.exe
SOURCE_FILES=msgwin.cpp
!include <zaf.mak>

TARGET=sclwn16.exe
SOURCE_FILES=sclwin.cpp
!include <zaf.mak>

TARGET=mdiwn16.exe
SOURCE_FILES=mdiwin.cpp
!include <zaf.mak>

TARGET=win16.exe
SOURCE_FILES=window.cpp
!include <zaf.mak>

# ----- blinker -------------------------------------------------------------
TARGET_TYPE=EXE
PLATFORM=DOS16B
DEFINITION_FILE=

TARGET=dlgwn1b.exe
SOURCE_FILES=dlgwin.cpp
!include <zaf.mak>

TARGET=msgwn1b.exe
SOURCE_FILES=msgwin.cpp
!include <zaf.mak>

TARGET=sclwn1b.exe
SOURCE_FILES=sclwin.cpp
!include <zaf.mak>

TARGET=mdiwn1b.exe
SOURCE_FILES=mdiwin.cpp
!include <zaf.mak>

TARGET=win1b.exe
SOURCE_FILES=window.cpp
!include <zaf.mak>

# ----- DOS32 ---------------------------------------------------------------

TARGET_TYPE=exe
PLATFORM=dos32
DEFINITION_FILE=

TARGET=dlgwn32.exe
SOURCE_FILES=dlgwin.cpp
!include <zaf.mak>

TARGET=msgwn32.exe
SOURCE_FILES=msgwin.cpp
!include <zaf.mak>

TARGET=sclwn32.exe
SOURCE_FILES=sclwin.cpp
!include <zaf.mak>

TARGET=mdiwn32.exe
SOURCE_FILES=mdiwin.cpp
!include <zaf.mak>

TARGET=win32.exe
SOURCE_FILES=window.cpp
!include <zaf.mak>

# ----- WIN16 ---------------------------------------------------------------

TARGET_TYPE=exe
PLATFORM=win16
DEFINITION_FILE=win16.def

TARGET=wdlgwn16.exe
SOURCE_FILES=dlgwin.cpp
!include <zaf.mak>

TARGET=wmsgwn16.exe
SOURCE_FILES=msgwin.cpp
!include <zaf.mak>

TARGET=wsclwn16.exe
SOURCE_FILES=sclwin.cpp
!include <zaf.mak>

TARGET=wmdiwn16.exe
SOURCE_FILES=mdiwin.cpp
!include <zaf.mak>

TARGET=wwin16.exe
SOURCE_FILES=window.cpp
!include <zaf.mak>

# ----- WIN32 ---------------------------------------------------------------

TARGET_TYPE=exe
PLATFORM=win32
DEFINITION_FILE=

TARGET=wdlgwn32.exe
SOURCE_FILES=dlgwin.cpp
!include <zaf.mak>

TARGET=wmsgwn32.exe
SOURCE_FILES=msgwin.cpp
!include <zaf.mak>

TARGET=wsclwn32.exe
SOURCE_FILES=sclwin.cpp
!include <zaf.mak>

TARGET=wmdiwn32.exe
SOURCE_FILES=mdiwin.cpp
!include <zaf.mak>

TARGET=wwin32.exe
SOURCE_FILES=window.cpp
!include <zaf.mak>

# ----- WIN32DLL ------------------------------------------------------------

TARGET_TYPE=exedll
PLATFORM=win32
DEFINITION_FILE=

TARGET=wdlgwin.exe
SOURCE_FILES=dlgwin.cpp
!include <zaf.mak>

TARGET=wmsgwin.exe
SOURCE_FILES=msgwin.cpp
!include <zaf.mak>

TARGET=wsclwin.exe
SOURCE_FILES=sclwin.cpp
!include <zaf.mak>

TARGET=wmdiwin.exe
SOURCE_FILES=mdiwin.cpp
!include <zaf.mak>

TARGET=wwin.exe
SOURCE_FILES=window.cpp
!include <zaf.mak>

# ----- vxWorks -------------------------------------------------------------

TARGET_TYPE=exe
PLATFORM=vxworks
DEFINITION_FILE=
ADD_COMPILE_OPTS=-DZAF_VXW_APP_NAME=vwin

TARGET=vdlgwin.o
SOURCE_FILES=dlgwin.cpp v_app.cpp
!include <zaf.mak>

TARGET=vmsgwin.o
SOURCE_FILES=msgwin.cpp v_app.cpp
!include <zaf.mak>

TARGET=vsclwin.o
SOURCE_FILES=sclwin.cpp v_app.cpp
!include <zaf.mak>

TARGET=vmdiwin.o
SOURCE_FILES=mdiwin.cpp v_app.cpp
!include <zaf.mak>

TARGET=vwin.o
SOURCE_FILES=window.cpp v_app.cpp
!include <zaf.mak>
