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

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: timer116.exe timer216.exe

dos16b: timer11b.exe timer21b.exe

dos32: timer132.exe timer232.exe

win16: wtimr116.exe wtimr216.exe

win32: wtimr132.exe wtimr232.exe 

win32dll: wtimer1.exe wtimer2.exe

vxworks: vtimer1.o vtimer2.o

# ----- Targets -------------------------------------------------------------

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

#
# Build options for timer116.exe
#
TARGET=timer116.exe
TARGET_TYPE=EXE
PLATFORM=DOS16
SOURCE_FILES=timer1.cpp
DEFINITION_FILE=$(D16_DEFINITION_FILE)
!include <zaf.mak>

#
# Build options for timer216.exe
#
TARGET=timer216.exe
TARGET_TYPE=EXE
PLATFORM=DOS16
SOURCE_FILES=timer2.cpp
DEFINITION_FILE=$(D16_DEFINITION_FILE)
!include <zaf.mak>

#
# Build options for timer11b.exe
#
TARGET=timer11b.exe
TARGET_TYPE=EXE
PLATFORM=DOS16B
SOURCE_FILES=timer1.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for timer21b.exe
#
TARGET=timer21b.exe
TARGET_TYPE=EXE
PLATFORM=DOS16B
SOURCE_FILES=timer2.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for timer132.exe
#
TARGET=timer132.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=timer1.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for timer232.exe
#
TARGET=timer232.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=timer2.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wtimr116.exe
#
TARGET=wtimr116.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=timer1.cpp
DEFINITION_FILE=win16.def
!include <zaf.mak>

#
# Build options for wtimr216.exe
#
TARGET=wtimr216.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=timer2.cpp
DEFINITION_FILE=win16.def
!include <zaf.mak>

#
# Build options for wtimr132.exe
#
TARGET=wtimr132.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=timer1.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wtimr232.exe
#
TARGET=wtimr232.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=timer2.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wtimer1.exe
#
TARGET=wtimer1.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=timer1.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wtimer2.exe
#
TARGET=wtimer2.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=timer2.cpp
DEFINITION_FILE=
!include <zaf.mak>

# ----- VxWorks -------------------------------------------------------------

ADD_COMPILE_OPTS=-DZAF_VXW_APP_NAME=vtimer

#
# Build options for vtimer1.o
#
TARGET=vtimer1.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=timer1.cpp v_app.cpp
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for vtimer2.o
#
TARGET=vtimer2.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=timer2.cpp v_app.cpp
DEFINITION_FILE=
!include <zaf.mak>

