# ****************************************************************************
# `BOOTMGR' - Makefile for `bootmgr' object
#   Written by Robert Riebisch
# ****************************************************************************

# necessary macros
!include "..\macros.mak"

# some basic error checking
!if !$d(AS) || !$d(ASFLAGS) || !$d(EP) || !$d(EPFLAGS) || !$d(EPOUT)
  !error Some necessary macros are not defined!
!endif

# define object
OBJECT = bootmgr

# where to store files
.path.com = ..\..

# Note: Even complex Makefile dependencies can be generated with a simple
#       "nasm.exe -o example.com -M example.asm > depends"

# implicit rule(s) (now, e.g., `example.com' autodepends on `example.asm')
.asm.com:
  # assemble
  $(AS) -o$@ $(ASFLAGS) $<

  # try to compress executable?
  !ifdef PACK
    -$(EP) $(EPFLAGS) $@ $(EPOUT)
  !endif

# define an object and its dependencies
$(OBJECT).com: \
  bootload.inc \
  generic.inc \
  defs.inc \
  convert.inc \
  dialogs.inc \
  data.inc \
  partdef.inc

clean:
  -del $(.path.com)\$(OBJECT).com
