# Zinc Application Framework - OPTSMSC.MAK
# COPYRIGHT (C) 1990-1999.  All Rights Reserved.
# Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#############################################################################
#
# "optsmsc.mak" is the third in a series of four make files used to easily
# build ZAF projects from the command prompt -- it should not be invoked
# directly.  This file is also used when building the ZAF libraries.
#
# The four files used to build ZAF projects are:
# 1. zmake.mak - User supplied make file (see example below)
# 2. zaf.mak - The main ZAF make included by the user make file
# 3. opts???.mak  - Compiler options unique to each compiler
# 4. zaf???.mak  - rule definitions unique to each compiler
#
# Applications and ZAF libraries should be build with identical compiler
# options to ensure compatibility.  If changes are made to this file the
# ZAF libraries should be rebuilt prior to building applications.
#
#############################################################################

#
# ----- Shared  options -----------------------------------------------------
#

#
# Compile options
#
# /c    	- compile only, no link
# /D    	- define macro
# /GR		- generate RTTI
# /W3		- maximum warning level
# /nologo	- suppress banner information
SHARED_COMPILE_OPTIONS=$(DEBUG_COMPILE_OPTIONS) /c /W3 /nologo $(ADD_COMPILE_OPTS)

#
# Link options
#
SHARED_LINK_OPTIONS=$(DEBUG_LINK_OPTIONS) /nologo $(ADD_LINK_OPTS)

#
# Library options
#
SHARED_LIBRARY_OPTIONS=$(DEBUG_LIBRARY_OPTIONS)

#
# Debug options
#
# /Zi   - generate debugging information
DEBUG_COMPILE_OPTIONS_OFF=
DEBUG_COMPILE_OPTIONS_ON=/Zi
DEBUG_LINK_OPTIONS_ON=/DEBUG:MAPPED,FULL /DEBUGTYPE:CV
DEBUG_LINK_OPTIONS_OFF=
DEBUG_LIBRARY_OPTIONS_OFF=
DEBUG_LIBRARY_OPTIONS_ON=

#
# ----- 32 bit DOS options --------------------------------------------------
#

D32_COMPILER=cl
D32_LINKER=386link
D32_LIBRARIAN=lib

# /DDOS386  - Define macro
# /nologo   - 
D32_COMPILE_OPTIONS=$(SHARED_COMPILE_OPTIONS) /DDOS386 /nologo -DZAF_METAWINDOW

# @msvc32.lnk  - TNT link options
# /fixed:no    -
#D32_LINK_OPTIONS=@msvc32.lnk $(SHARED_LINK_OPTIONS) /fixed:no
D32_LINK_OPTIONS=@msvc32.nt $(SHARED_LINK_OPTIONS)

D32_LIBRARY_OPTIONS=$(SHARED_LIBRARY_OPTIONS)

D32_OBJECT_FILES=
D32_LIBRARIES=dosx32.lib dos32.lib zafd32.lib met_xt3d.lib met_pb3l.lib oldnames.lib

#
# ----- 32 bit Windows options ----------------------------------------------
#

W32_COMPILER=cl
W32_LINKER=link
W32_LIBRARIAN=lib
W32_RESOURCE_COMPILER=rc

W32_COMPILE_OPTIONS=$(SHARED_COMPILE_OPTIONS) /DWIN32
W32_LINK_OPTIONS= /subsystem:windows $(SHARED_LINK_OPTIONS)
W32_LIBRARY_OPTIONS=$(SHARED_LIBRARY_OPTIONS) /machine:i386 /subsystem:WINDOWS
W32_RESOURCE_OPTIONS=

W32_OBJECT_FILES=

W32_LIBRARIES=zafw32.lib $(PERSIST_LIBRARY32) libc.lib winspool.lib \
	kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib oldnames.lib \
	ctl3d32.lib


#
# ----- 32 bit Windows DLL options ------------------------------------------
#

# /MD   - Link with MSVCRT.lib
# /D    - define macro
W32_DLL_EXPORT_COMPILE_OPTIONS=$(SHARED_COMPILE_OPTIONS) /MD /DZAF_DLL_EXPORT /DWIN32

# /MD   - Link with MSVCRT.lib
# /D    - define macro
W32_DLL_IMPORT_COMPILE_OPTIONS=$(SHARED_COMPILE_OPTIONS) /MD /DZAF_DLL_IMPORT /DWIN32

# -Tpd  - Build a Windows .DLL file 
# -aa   - Specifies application target type as Windows
W32_DLL_LINK_OPTIONS=$(SHARED_LINK_OPTIONS) /DLL

W32_DLL_EXPORT_OBJECT_FILES=
W32_DLL_EXPORT_LIBRARIES=kernel32.lib user32.lib gdi32.lib comctl32.lib \
	oldnames.lib ctl3d32.lib comdlg32.lib msvcrt.lib winspool.lib

W32_DLL_IMPORT_OBJECT_FILES=
W32_DLL_IMPORT_LIBRARIES=zafw32i.lib zafw32d.lib \
	kernel32.lib user32.lib gdi32.lib comctl32.lib oldnames.lib \
	ctl3d32.lib comdlg32.lib msvcrt.lib
