# ----- 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: hello116.exe hello216.exe hello316.exe

dos16b: hello1b.exe hello2b.exe hello3b.exe

dos32: hello132.exe hello232.exe hello332.exe

win16: whllo116.exe whllo216.exe whllo316.exe

win32: whllo132.exe whllo232.exe whllo332.exe

win32dll: whello1.exe whello2.exe whello3.exe

vxworks: vhello1.o vhello2.o vhello3.o

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

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

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

#
# Build options for hello216.exe
#
TARGET=hello216.exe
TARGET_TYPE=EXE
PLATFORM=DOS16
SOURCE_FILES=hello2.cpp
ADD_LIBRARIES=zafd16p.lib
DEFINITION_FILE=$(D16_DEFINITION_FILE)
!include <zaf.mak>

#
# Build options for hello316.exe
#
TARGET=hello316.exe
TARGET_TYPE=EXE
PLATFORM=DOS16
SOURCE_FILES=hello3.cpp
ADD_LIBRARIES=zafd16p.lib
DEFINITION_FILE=$(D16_DEFINITION_FILE)
!include <zaf.mak>

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

#
# Build options for hello2b.exe
#
TARGET=hello2b.exe
TARGET_TYPE=EXE
PLATFORM=DOS16B
SOURCE_FILES=hello2.cpp
ADD_LIBRARIES=zafd16p.lib
DEFINITION_FILE=
!include <zaf.mak>

#
# Build options for hello3b.exe
#
TARGET=hello3b.exe
TARGET_TYPE=EXE
PLATFORM=DOS16B
SOURCE_FILES=hello3.cpp
ADD_LIBRARIES=zafd16p.lib
DEFINITION_FILE=
!include <zaf.mak>

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

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

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

#
# Build options for whllo116.exe
#
TARGET=whllo116.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=hello1.cpp
ADD_LIBRARIES=
DEFINITION_FILE=whello16.def
!include <zaf.mak>

#
# Build options for whllo216.exe
#
TARGET=whllo216.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=hello2.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=whello16.def
!include <zaf.mak>

#
# Build options for whllo316.exe
#
TARGET=whllo316.exe
TARGET_TYPE=EXE
PLATFORM=WIN16
SOURCE_FILES=hello3.cpp
ADD_LIBRARIES=zafw16p.lib
DEFINITION_FILE=whello16.def
!include <zaf.mak>

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

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

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

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

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

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

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

ADD_COMPILE_OPTS=-DZAF_VXW_APP_NAME=vhello

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

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

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