# Makefile for Freemacs
# Copyright (C) Russell Nelson 1986-1998

# Changes to this file:
# 7 Jul 1998 - added comments (Jim Hall)
# 7 Jul 1998 - added the AS, ASFLAGS, and RM macros (Jim Hall)
# 7 Jul 1998 - added the /m4 flag to build execute.asm (Jim Hall)


# Macros for building, deleting

AS=tasm
ASFLAGS=

RM=del

# Rule to build .obj from .asm

.asm.obj:
	$(AS) $(ASFLAGS) $*;

# Targets:

all: emacsibm.exe

emacsibm.exe: mintprim.obj mintscan.obj mintform.obj emacs.obj redisp.obj \
buffers.obj ibm.obj files.obj search.obj marks.obj execute.obj \
memory.obj mintlast.obj version.obj emacspwn.obj
	tlink @emacsibm.bll

# Object files:

buffers.obj: memory.def

emacs.obj: memory.def mint.def findfile.def

execute.obj: memory.def
	$(AS) $(ASFLAGS) /m4 execute.asm

files.obj: memory.def

ibm.obj: memory.def

marks.obj: memory.def mint.def mintform.def

mintform.obj: mintform.def mint.def

mintlast.obj: memory.def

mintprim.obj: mintform.def mint.def findfile.def

mintscan.obj: mint.def

search.obj: memory.def

# Clean up:

clean:
	-$(RM) *.~

realclean: clean
	-$(RM) *.obj
	-$(RM) *.map

distclean: realclean
	-$(RM) *.exe
