#    File              : $Workfile: MAKEFILE$
#
#    Description       : MAKEFILE for the component VM_GDOS.
#
#    Last Edited By    : $Author: AWIGHTMA$
#
#########################################################################
#       Copyright 1999, Caldera Thin Clients, Inc.                      #
#       This software is licenced under the GNU Public License.         #
#       Please see LICENSE.TXT for further information.                 #
#                                                                       #
#                  Historical Copyright                                 #
#                                                                       #
#	Copyright (C) 1976-1992 Digital Research Inc. All rights	#
#	reserved. The Software Code contained in this listing is	#
#	proprietary to Digital Research Inc., Monterey,			#
#	California, and is covered by U.S. and other copyright		#
#	protection. Unauthorized copying, adaption, distribution,	#
#	use or display is prohibited and may be subject to civil	#
#	and criminal penalties. Disclosure to others is			#
#	prohibited. For the terms and conditions of software use,	#
#	refer to the appropriate Digital Research Licence		#
#	Agreement.							#
#########################################################################
#
#    Note              : The variables used in this MAKEFILE are:
#                            IS    Language-independent source directory
#                            DS    Language-dependent source directory
#                            IO    Language-independent object directory
#                            DO    Language-dependent object directory
#                            BIN   Language-dependent dxecutable directory
#                        The following variables may be set in this
#                        MAKEFILE:
#                            REVISION        # Library/Include revision
#                            MODEL           # Memory model
#                            DEF_CC          # Default C product
#                            DEF_AS          # Default ASM product
#
#    *** Current Edit History ***
#    *** End of Current Edit History ***
#
#    $Log: $
#    MAKEFILE 1.1 92/07/23 18:07:27 AWIGHTMA
#    Use EXEMOD not EXEHDR and debug bezier code atw
#    
#    
#
#

###############################################################################
#                            DEFAULTS SECTION
###############################################################################
# Note to engineers:
#   This section normally does not need any alteration by you, unless
#   one or more of the standard defaults must be changed. If this is the
#   case, uncomment the macro definition and assign the non-default value
#   you have selected to it.
#
###############################################################################
# If a particular level of INCLUDE or LIB files are needed, rather than
# the latest set denoted by $(PRJ_LVL), uncomment the definition of
# $(INCL_REV) or $(LIB_REV) and assign it an earlier $(PRJ_LVL) value.
# INCL_REV =
# LIB_REV  =

# If a memory model different from the default (s) is needed, specify it here.
# Values: s = Small, m = Medium, l = Large, c = Compact, h = Huge, t = Tiny.
# NB. Value MUST be lower-case.
MODEL = c

# If a C compiler different from the default is required, specify it here.
#DEF_CC = 

# If an assembler different from the default is required, specify it here.
#DEF_AS =

###############################################################################
#                     END OF DEFAULTS SECTION
###############################################################################

###############################################################################
#                     FLAGS SECTION
###############################################################################
# Note to engineers:
#   This section allows you to specify extra flags for the C compiler,
#   Assembler and Linker. Normally you should not need to specify any
#   extra flags. Remember the -debug and -prod switches to the BUILD
#   command -- they should provide most of your requirements.
#
###############################################################################
#LFLAGS =
#AFLAGS	=
#CFLAGS  = -DBEZ		# define BEZ to include bezier support

###############################################################################
#                     END OF FLAGS SECTION
###############################################################################

# DO NOT ALTER OR REMOVE!
!if $d(VCS)
!    include $(VCS)\$(PRJ).MAK
!else
!    include C:\$(PRJ).MAK
!endif

# DO NOT ALTER OR REMOVE!
# Default action if MAKE invoked without arguments.
default:
	@echo Error: Use BUILD command to produce component.

###############################################################################
#                            COMPONENT(S) SECTION
###############################################################################
# Note to engineers:
#   This section identifies the source files and object files for each of
#   the components which this MAKEFILE can build. These files are identified
#   by defining macros which list them. These macros have particular names:
#       <comp>_IND_SRC       Language-independent source files for <comp>
#       <comp>_DEP_SRC       Language-dependent source files for <comp>
#       <comp>_INC           Local include files for <comp>
#       <comp>_IND_OBJ       Language-independent object files for <comp>
#       <comp>_DEP_OBJ       Language-dependent object files for <comp>
#   By convention, <comp> is the filename p`rt of the component being
#   built, in uppercase.
#   It is perfectly OK to build any of the macros above by using other
#   macros defined earlier. In fact, this ir often necessary for the linking
#   of components, where the list of object files has to be broken up.
#
#   Certain macros are required for the SCCS system to work:
#       IND_SRC
#       DEP_SRC
#       IND_OBJ
#       DEP_OBJ
#   These are defined as the concatenation of the individual component
#   macros with the macro name as suffix.
#
#   If only one component is being built, the <comp>_* macros can be
#   omitted, and the four macros listed above can be defined directly
#   from the file names.
#
###############################################################################
# Specify all the language-independent modules which form the source
# for the component. Also specify the local include files for the component.
# Each should be prepended with "$(IS)\". Note that source filenames can be
# listed more than once, if more than one component uses them.
GDOS_IND_SRC1 	= $(IS)\entry.asm $(IS)\bezier.c $(IS)\gextend.asm
GDOS_IND_SRC2 	= $(IS)\escape.asm $(IS)\control.asm $(IS)\fonts.asm
GDOS_IND_SRC3 	= $(IS)\decode.asm $(IS)\headers.asm $(IS)\driver.asm
GDOS_IND_SRC4 	= $(IS)\utility.asm $(IS)\dosutil.asm $(IS)\data.asm
GDOS_IND_SRC5 	= $(IS)\loader.asm $(IS)\dbcs.asm
GDOS_IND_SRC6 	= $(IS)\chev.asm $(IS)\overlay.asm $(IS)\stack.asm
GDOS_IND_SRC7 	= $(IS)\command.asm $(IS)\inifile.asm
GDOS_IND_SRC8	= $(GDOS_IND_SRC1) $(GDOS_IND_SRC2) $(GDOS_IND_SRC3)
GDOS_IND_SRC9	= $(GDOS_IND_SRC4) $(GDOS_IND_SRC5) $(GDOS_IND_SRC6)
GDOS_IND_SRC	= $(GDOS_IND_SRC7) $(GDOS_IND_SRC8) $(GDOS_IND_SRC9)
GDOS_INC	= $(IS)\equates.inc $(IS)\portab.h
IND_SRC  	= $(GDOS_IND_SRC) $(GDOS_INC)

# Specify all the language-dependent modules which are part of the source
# for the component. Each should be prepended with "$(DS)\".
GDOS_DEP_SRC 	= $(DS)\gdosmsg.das
DEP_SRC  	= $(GDOS_DEP_SRC)

# Specify all the language-independent object modules which are needed to
# link the component. Each should be prepended with "$(IO)\". Use several
# variables to permit passing the object filenames to LINK on multiple
# lines.
GDOS_IND_OBJ1 	= $(IO)\entry.obj $(IO)\bezier.obj $(IO)\gextend.obj
GDOS_IND_OBJ2 	= $(IO)\escape.obj $(IO)\control.obj $(IO)\fonts.obj
GDOS_IND_OBJ3 	= $(IO)\decode.obj $(IO)\headers.obj $(IO)\driver.obj
GDOS_IND_OBJ4 	= $(IO)\utility.obj $(IO)\dosutil.obj $(IO)\data.obj
GDOS_IND_OBJ5 	= $(IO)\loader.obj $(IO)\dbcs.obj
GDOS_IND_OBJ6 	= $(IO)\chev.obj $(IO)\overlay.obj $(IO)\stack.obj
GDOS_IND_OBJ7 	= $(IO)\command.obj $(IO)\inifile.obj
GDOS_IND_OBJ8	= $(GDOS_IND_OBJ1) $(GDOS_IND_OBJ2) $(GDOS_IND_OBJ3)
GDOS_IND_OBJ9	= $(GDOS_IND_OBJ4) $(GDOS_IND_OBJ5) $(GDOS_IND_OBJ6)
GDOS_IND_OBJ	= $(GDOS_IND_OBJ7) $(GDOS_IND_OBJ8) $(GDOS_IND_OBJ9)
IND_OBJ  	= $(GDOS_IND_OBJ)

# Specify all the language-dependent object modules which are needed to
# link the component. Each should be prepended with "$(DO)\".
# Note that in the DLS case, each module must be listed twice, once
# with "$(DO)\" and once with "$(ADO)\". Note that object filenames
# can be listed more than once, if more than one component needs them.
!if $(DLSFLG) == DLS
GDOS_DEP_OBJ  = $(DO)\gdosmsg.obj  $(ADO)\gdosmsg.obj
!else
GDOS_DEP_OBJ  = $(DO)\gdosmsg.obj
!endif

DEP_OBJ		= $(GDOS_DEP_OBJ)

# Master target to build the component(s).
all: gdos

# Subsidiary targets for each class of component.
indep_all:	indep_gdos
depend_all:	depend_gdos
build_all:	build_gdos

# Subsidiary targets for each component.
gdos:	indep_gdos depend_gdos build_gdos

# Indep target for component.
indep_gdos:	$(GDOS_IND_OBJ)

# Depend target for component.
depend_gdos:	$(GDOS_DEP_OBJ)

# Build target for component.
build_gdos: $(BIN)\viewmax.exe

$(BIN)\viewmax.exe:	$(GDOS_IND_OBJ) $(GDOS_DEP_OBJ) makefile
	$(LNK) /ms @&&!
$(GDOS_IND_OBJ1)+
$(GDOS_IND_OBJ2)+
$(GDOS_IND_OBJ3)+
$(GDOS_IND_OBJ4)+
$(GDOS_IND_OBJ5)+
$(GDOS_IND_OBJ6)+
$(GDOS_IND_OBJ7)+
$(GDOS_DEP_OBJ)
$@
$(BIN)\viewmax.map
$(CLIB)
!
	$(PKLITE) $@ $(PKOPTS)
	$(EXEMOD) $@ /max 256
	
###############################################################################
#                     END OF COMPONENT(S) SECTION
###############################################################################

!if $d(NEED_IND_SRC)
###############################################################################
#                     INDEPENDENT SOURCE FILES SECTION
###############################################################################
# Note to engineers:
#   This section contains the rules which associate the language-independent
#   object modules with their source files. Each language-independent object
#   module should be listed here, together with source files and local include
#   files which are used to create it. By convention, MAKEFILE sould be listed
#   as on the right of the ':'. Also by convention, include files which are
#   not local are NOT listed.
#
#   This section is surrounded by !if $d(NEED_IND_SRC) ... !endif brackets.
#   This allows for the translators to use this MAKEFILE without change, even
#   they do not receive the language-independent source files; by providing
#   though them with the language-independent object files, and a BUILD.BAT
#   which does not define IND_SRC before invoking MAKE.
###############################################################################
# List of language-independent source/object dependencies. One
# per language-independent compilable source file.
$(IO)\command.obj:	$(IS)\command.asm $(IS)\equates.inc makefile
$(IO)\bezier.obj:	$(IS)\bezier.c $(IS)\portab.h makefile
$(IO)\control.obj:	$(IS)\control.asm $(IS)\equates.inc makefile
$(IO)\data.obj:		$(IS)\data.asm $(IS)\equates.inc makefile
$(IO)\decode.obj:	$(IS)\decode.asm $(IS)\equates.inc makefile
$(IO)\dosutil.obj:	$(IS)\dosutil.asm $(IS)\equates.inc makefile
$(IO)\driver.obj:	$(IS)\driver.asm $(IS)\equates.inc makefile
$(IO)\escape.obj:	$(IS)\escape.asm $(IS)\equates.inc makefile
$(IO)\fonts.obj:	$(IS)\fonts.asm $(IS)\equates.inc makefile
$(IO)\gextend.obj:	$(IS)\gextend.asm $(IS)\equates.inc makefile
$(IO)\headers.obj:	$(IS)\headers.asm $(IS)\equates.inc makefile
$(IO)\loader.obj:	$(IS)\loader.asm $(IS)\equates.inc makefile
$(IO)\overlay.obj:	$(IS)\overlay.asm $(IS)\equates.inc makefile
$(IO)\stack.obj:	$(IS)\stack.asm $(IS)\equates.inc makefile
$(IO)\utility.obj:	$(IS)\utility.asm $(IS)\equates.inc makefile
$(IO)\entry.obj:	$(IS)\entry.asm $(IS)\equates.inc makefile
$(IO)\inifile.obj:	$(IS)\inifile.asm $(IS)\equates.inc makefile
$(IO)\chev.obj:		$(IS)\chev.asm  $(IS)\equates.inc makefile
$(IO)\dbcs.obj:		$(IS)\dbcs.asm  $(IS)\equates.inc makefile

###############################################################################
#         END OF INDEPENDENT SOURCE FILES SECTION
###############################################################################
!endif # NEED_IND_SRC

###############################################################################
#                     DEPENDENT SOURCE FILES SECTION
###############################################################################
# Note to engineers:
#   This section contains the rules which associate the language-dependent
#   object modules with their source files. Each language-dependent object
#   module should be listed here, together with source files and local include
#   files which are used to create it. By convention, MAKEFILE sould be listed
#   as on the right of the ':'. Also by convention, include files which are
#   not local are NOT listed.
###############################################################################
# List of language-dependent source/object dependencies. One
# per language-dependent compilable source file.
$(DO)\gdosmsg.obj:	$(DS)\gdosmsg.das $(IS)\equates.inc makefile

###############################################################################
#         END OF DEPENDENT SOURCE FILES SECTION
###############################################################################

# DO NOT ALTER OR REMOVE!
# All MAKEFILEs need this to use the SCCS system.
!if $d(VCSDIR)
!    include $(VCSDIR)\SCCS.MAK
!endif

