# ----- 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: bnum16.exe date16.exe int16.exe real16.exe time16.exe utime16.exe

dos16b: bnum1b.exe date1b.exe int1b.exe real1b.exe time1b.exe utime1b.exe

dos32: bnum32.exe date32.exe int32.exe real32.exe time32.exe utime32.exe

win16: wbnum16.exe wdate16.exe wint16.exe wreal16.exe wtime16.exe wutime16.exe

win32: wbnum32.exe wdate32.exe wint32.exe wreal32.exe wtime32.exe wutime32.exe

win32dll: wbnum.exe wdate.exe wint.exe wreal.exe wtime.exe wutime.exe

vxworks: vbnum.o vdate.o vint.o vreal.o vtime.o vutime.o

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

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

# ----- pharlap -------------------------------------------------------------
TARGET_TYPE=EXE
PLATFORM=DOS16
ADD_LIBRARIES=zafd16p.lib
DEFINITION_FILE=$(D16_DEFINITION_FILE)

#
# Build options for bnum16.exe
#
TARGET=bnum16.exe
SOURCE_FILES=bignum.cpp bnumwn.cpp
!include <zaf.mak>

#
# Build options for date16.exe
#
TARGET=date16.exe
SOURCE_FILES=date.cpp datewn.cpp
!include <zaf.mak>

#
# Build options for int16.exe
#
TARGET=int16.exe
SOURCE_FILES=integer.cpp intwn.cpp
!include <zaf.mak>

#
# Build options for real16.exe
#
TARGET=real16.exe
SOURCE_FILES=real.cpp realwn.cpp
!include <zaf.mak>

#
# Build options for time16.exe
#
TARGET=time16.exe
SOURCE_FILES=time.cpp timewn.cpp
!include <zaf.mak>

#
# Build options for utime16.exe
#
TARGET=utime16.exe
SOURCE_FILES=utime.cpp utimewn.cpp
!include <zaf.mak>

# ----- blinker -------------------------------------------------------------
TARGET_TYPE=EXE
PLATFORM=DOS16B
ADD_LIBRARIES=zafd16p.lib
DEFINITION_FILE=

#
# Build options for bnum1b.exe
#
TARGET=bnum1b.exe
SOURCE_FILES=bignum.cpp bnumwn.cpp
!include <zaf.mak>

#
# Build options for date1b.exe
#
TARGET=date1b.exe
SOURCE_FILES=date.cpp datewn.cpp
!include <zaf.mak>

#
# Build options for int1b.exe
#
TARGET=int1b.exe
SOURCE_FILES=integer.cpp intwn.cpp
!include <zaf.mak>

#
# Build options for real1b.exe
#
TARGET=real1b.exe
SOURCE_FILES=real.cpp realwn.cpp
!include <zaf.mak>

#
# Build options for time1b.exe
#
TARGET=time1b.exe
SOURCE_FILES=time.cpp timewn.cpp
!include <zaf.mak>

#
# Build options for utime1b.exe
#
TARGET=utime1b.exe
SOURCE_FILES=utime.cpp utimewn.cpp
!include <zaf.mak>

#
# Build options for bnum32.exe
#
TARGET=bnum32.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=bignum.cpp bnumwn.cpp
ADD_LIBRARIES=zafd32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for date32.exe
#
TARGET=date32.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=date.cpp datewn.cpp
ADD_LIBRARIES=zafd32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for int32.exe
#
TARGET=int32.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=integer.cpp intwn.cpp
ADD_LIBRARIES=zafd32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for real32.exe
#
TARGET=real32.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=real.cpp realwn.cpp
ADD_LIBRARIES=zafd32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for time32.exe
#
TARGET=time32.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=time.cpp timewn.cpp
ADD_LIBRARIES=zafd32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for utime32.exe
#
TARGET=utime32.exe
TARGET_TYPE=EXE
PLATFORM=DOS32
SOURCE_FILES=utime.cpp utimewn.cpp
ADD_LIBRARIES=zafd32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wbnum16.exe
#
TARGET=wbnum16.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=bignum.cpp bnumwn.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=wfmt16.def
!include <zaf.mak>

#
# Build options for wdate16.exe
#
TARGET=wdate16.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=date.cpp datewn.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=wfmt16.def
!include <zaf.mak>

#
# Build options for wint16.exe
#
TARGET=wint16.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=integer.cpp intwn.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=wfmt16.def
!include <zaf.mak>

#
# Build options for wreal16.exe
#
TARGET=wreal16.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=real.cpp realwn.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=wfmt16.def
!include <zaf.mak>

#
# Build options for wtime16.exe
#
TARGET=wtime16.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=time.cpp timewn.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=wfmt16.def
!include <zaf.mak>

#
# Build options for wutime16.exe
#
TARGET=wutime16.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=utime.cpp utimewn.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=wfmt16.def
!include <zaf.mak>

#
# Build options for wbnum32.exe
#
TARGET=wbnum32.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=bignum.cpp bnumwn.cpp
ADD_LIBRARIES=zafw32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wdate32.exe
#
TARGET=wdate32.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=date.cpp datewn.cpp
ADD_LIBRARIES=zafw32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wint32.exe
#
TARGET=wint32.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=integer.cpp intwn.cpp
ADD_LIBRARIES=zafw32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wreal32.exe
#
TARGET=wreal32.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=real.cpp realwn.cpp
ADD_LIBRARIES=zafw32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wtime32.exe
#
TARGET=wtime32.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=time.cpp timewn.cpp
ADD_LIBRARIES=zafw32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wutime32.exe
#
TARGET=wutime32.exe
TARGET_TYPE=EXE
PLATFORM=WIN32
SOURCE_FILES=utime.cpp utimewn.cpp
ADD_LIBRARIES=zafw32p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wbnum.exe
#
TARGET=wbnum.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=bignum.cpp bnumwn.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wdate.exe
#
TARGET=wdate.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=date.cpp datewn.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wint.exe
#
TARGET=wint.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=integer.cpp intwn.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wreal.exe
#
TARGET=wreal.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=real.cpp realwn.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wtime.exe
#
TARGET=wtime.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=time.cpp timewn.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for wutime.exe
#
TARGET=wutime.exe
TARGET_TYPE=EXEDLL
PLATFORM=WIN32
SOURCE_FILES=utime.cpp utimewn.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

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

ADD_COMPILE_OPTS=-DZAF_VXW_APP_NAME=vformat

#
# Build options for vbnum.o
#
TARGET=vbnum.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=bignum.cpp bnumwn.cpp v_app.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for vdate.o
#
TARGET=vdate.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=date.cpp datewn.cpp v_app.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for vint.o
#
TARGET=vint.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=integer.cpp intwn.cpp v_app.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for vreal.o
#
TARGET=vreal.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=real.cpp realwn.cpp v_app.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for vtime.o
#
TARGET=vtime.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=time.cpp timewn.cpp v_app.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for vutime.o
#
TARGET=vutime.o
TARGET_TYPE=exe
PLATFORM=vxworks
SOURCE_FILES=utime.cpp utimewn.cpp v_app.cpp
ADD_LIBRARIES=
DEFINITION_FILE=
!include <zaf.mak>
