# @@ COPY_RIGHT_HERE
# @@ ROADMAP :: Makefile aid for dependency file generation

#
# Pls record ALL changes here with reason!
#
# jonn, 5/11/91, Created
#
#	This .mk makefile allows most makefiles to avoid having to
#	define their own DEPEND target.  These three incoming macros
#	select the target directories.  More than one may be specified;
#	if none is specified, DEPEND_BASE is default.
#	DEPEND_BASE: build to $(BINARIES_LM21), $(BINARIES_LM30)
#	DEPEND_WIN: build to $(BINARIES_WIN_LM21), $(BINARIES_WIN_LM30)
#	DEPEND_OS2: build to $(BINARIES_OS2_LM21), $(BINARIES_OS2_LM30)
#	
# jonn, 5/14/91, Added BINARIES_DOS and support macros
#	DEPEND_DOS
#
# t-yis, 6/20/91 
#   Include uideprul.mk and uidepseg.mk to support code segment optimization.
#   Macro SEG00 should be declared before including this file if you
#   want to optimize code segment usage.
#	
# jonn, 11/21/91, nuked LM21/LM30 distinction


# use default $(BINARIES) if none of DEPEND_WIN, DEPEND_OS2 or
# DEPEND_DOS defined
!ifndef DEPEND_WIN
!ifndef DEPEND_OS2
!ifndef DEPEND_DOS
DEPEND_BASE = TRUE
!endif
!endif
!endif

DEPEND_DIRS_COMMON =

!ifdef DEPEND_BASE
DEPEND_DIRS_COMMON = $(DEPEND_DIRS_COMMON) -S$(BINARIES)
!endif

!ifdef DEPEND_OS2
DEPEND_DIRS_COMMON = $(DEPEND_DIRS_COMMON) -S$(BINARIES_OS2)
!endif

!ifdef DEPEND_WIN
DEPEND_DIRS_COMMON = $(DEPEND_DIRS_COMMON) -S$(BINARIES_WIN)
!endif

!ifdef DEPEND_DOS
DEPEND_DIRS_COMMON = $(DEPEND_DIRS_COMMON) -S$(BINARIES_DOS)
!endif


# WARNING: uideprul.mk and uidepseg.mk are generated automatically.
#          make changes to uidepend.src only.
depend:
    $(CP) depend.mk depend.old
    echo # Header dependencies for:  $(MAKEDIR) > depend.mk
    echo # WARNING:  This file is automatically generated >> depend.mk
    echo # Edit it by hand and your changes will get nuked >> depend.mk
    echo # See depend section in makefile >> depend.mk
!include uideprul.mk   
!IFDEF SEG00  
!include uidepseg.mk
!ENDIF 
