###############################################################################
#
# LMkFile
#
# Makefile for the `LMk' utility required to build `term'
#
# Copyright © 1990-1992 by Olaf `Olsen' Barthel & MXM
#    All Rights Reserved
# 
###############################################################################

.c.o:
	LC $(CFLAGS) -HRAM:term.SYM $*.c

.c.oo:
	LC $(CFLAGS) -HRAM:term.SYM -O -o$*.oo $*.c

.asm.o:
	ASM -IASM: $*.asm

CFLAGS		= -cmqws -b1 -r1 -v -j89 -mt0 -n65
#CFLAGS		= -cmqws -b1 -r1 -v -j89 -mt3 -n65 -D_M68030
LFLAGS		= SC SD ND

LIBS		= LIB:amiga.lib LIB:lc.lib

OBJS		= Start.o CRC.o Format.o QuickSort.o SafeXEM_XPR.o CapturePanel.o \
		  ClipPanel.o CommandPanel.o CopyPanel.o CursorPanel.o DatePanel.o \
		  DayPanel.o EmulationPanel.o FastMacroPanel.o HotkeyPanel.o ImportPanel.o \
		  MacroPanel.o MiscPanel.o ModemPanel.o PasswordUserPanel.o PathPanel.o \
		  PhonePanel.o PrintPanel.o RatePanel.o ScreenPanel.o SerialPanel.o \
		  SpeechPanel.o TerminalPanel.o TimePanel.o TransferPanel.o TranslationPanel.o \
		  UploadPanel.o termAux.o termBeep.o termBuffer.o termCall.o \
		  termClip.oo termConsole.oo termCrypt.oo termData.o termDial.o \
		  termEmulation.oo termFastMacros.o termFileBuffer.oo termGadTools.o termHotkeys.o \
		  termIdentify.o termInfo.o termInit.o termLocale.o termMain.o \
		  termMarker.o termPacket.o termPhone.o termRaster.oo termReview.o \
		  termRexx.o termSaveWindow.o termScale.oo termScroll.oo termSerial.oo \
		  termSpeech.o termStatus.o termStringHook.o termStrings.o termTag.o \
		  termTransfer.o termTranslate.oo termXEM.oo termXPR.oo

all:		term.sym RAM:term.sym term

termTag.o:	termTag.asm term.i
		ASM -IASM: termTag.asm

term:		$(OBJS)
		BLINK WITH T:term.WITH <<!(T:term.WITH)
			FROM
			$(OBJS)
			TO
			$@
			LIB
			$(LIBS)
			$(LFLAGS)
		<

term.sym:	PreInclude.c termStrings.h termExtras.h OwnDevUnit.h xproto.h xem.h
		LC -cimqws -n65 -ph -o$@ PreInclude.c

RAM:term.sym:	term.sym
		Copy term.sym $@

termStrings.o:	termStrings.c termStrings.h
		LC -b1 -r1 -cs -n65 termStrings.c

termGadTools.o:	termGadTools.c
		LC $(CFLAGS) termGadTools.c

Start.o:	Start.c
		LC -cmqws -b1 -r1 -v -j89 -ms0 -n65 -O Start.c
#		LC -cmqws -b1 -r1 -v -j89 -ms0 -n65 -O -D_M68030 Start.c
