###############################################################################
#
#	SMakefile
#
#	Makefile for the `SMake' utility required to build `term'
#
#	Copyright © 1990-1994 by Olaf `Olsen' Barthel
#		All Rights Reserved
#
###############################################################################

.c.o:
	SC $(CFLAGS) $(GST) $(OPTIONS) $(OPTIMIZE) OBJNAME=$*.o $*.c

.c.oo:
	SC $(CFLAGS) $(GST) $(OPTIONS) $(OPTIMIZE) OBJNAME=$*.oo $*.c

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

CPU		= ANY
#CPU		= 68030

OPTIMIZE	= OPTIMIZE OPTINLOCAL OPTTIME

INCLUDEFLAGS	= DEFINE=INCLUDEALL
INCLUDEFILES	= gtlayout.h termGlobal.h termProtos.h \
		  termARexxAttributes.h termARexxGlobal.h

OPTIONS		= CPU=$(CPU) UTILLIB

GST		= GSTIMM GST=term.gst

CFLAGS		= MCCONS STREQ STRMERGE NOSTKCHK IDLEN=65 DEBUG=LINE NOVER
LFLAGS		= DEFINE __CXM33=__UCXM33 DEFINE __CXD33=__UCXD33 \
		  DEFINE __CXM22=__UCXM22 DEFINE __CXD22=__UCXD22 \
		  SC SD ND NOICONS

LIBS		= LIB:sc.lib LIB:amiga.lib

OBJS		= termTag.o ASCIIPanel.o CapturePanel.o ClipPanel.o CommandPanel.o \
		  CopyPanel.o CursorPanel.o DatePanel.o DayPanel.o EmulationPanel.o \
		  FastMacroPanel.o HotkeyPanel.o ImportPanel.o LibPanel.o MacroPanel.o \
		  MiscPanel.o ModemPanel.o PasswordUserPanel.o PathPanel.o PhonePanel.o \
		  PrintPanel.o QuickSort.o RatePanel.o ScreenPanel.o SerialPanel.o \
		  SoundPanel.o SpeechPanel.o Start.o termAbout.o termAmigaGuide.o \
		  termARexx.oo termARexxAttributes.oo termARexxCommands.oo termARexxData.o termASCIITransfer.oo \
		  termAux.o termBeep.o termBoxes.o termBuffer.oo termCall.o \
		  termCapture.oo termClip.oo termConfig.o termConsole.oo termCRC.o \
		  termCrypt.oo termData.o termDial.o termEmulation.oo termEmulationProcess.oo \
		  termFastMacros.o termFastMacroWindow.oo termFileBuffer.oo termHotkeys.o termIdentify.o \
		  TerminalPanel.o termInfoWindow.o termInit.o termLists.oo termLocale.o \
		  termMain.o termMarker.o termMemory.oo termMisc.o termMsgQueue.oo \
		  termOldConfig.o termPacket.o termPhone.o termPickFile.o termPickScreen.o \
		  termPrint.o termRaster.oo termRemember.oo termResponse.oo termReviewBuffer.oo \
		  termSaveWindow.o termScale.oo termScroll.oo termSendText.oo termSerial.oo \
		  termSound.oo termSpeech.o termStatusDisplay.o termStrings.o termTextBuffer.oo \
		  termTransfer.o termTranslate.oo termTraps.o termUploadQueue.o termXEM.oo \
		  termXPR.oo TimePanel.o TransferPanel.o TranslationPanel.o TrapPanel.o \
		  UploadPanel.o

all:		term.gst term

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

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

term.gst:	PreInclude.c termStrings.h termExtras.h OwnDevUnit.h xproto.h xem.h Rendezvous.h $(INCLUDEFILES)
		@Flush
		SC NOOBJNAME DEFINE=CATCOMP_NUMBERS IDLEN=65 $(INCLUDEFLAGS) MAKEGST=$@ PreInclude.c

termStrings.o:	termStrings.c termStrings.h
		SC $(CFLAGS) termStrings.c

Start.o:	Start.c
		SC $(CFLAGS) $(OPTIMIZE) DEFINE=_M$(CPU) Start.c

termARexxCommands.oo:		termARexxCommands.c termEmulationProcess.h termARexxGlobal.h termARexxAttributes.h
termARexx.o:			termARexx.c termARexxGlobal.h termARexxAttributes.h
termARexxData.o:		termARexxData.c termARexxGlobal.h termARexxAttributes.h
termARexxAttributes.oo:		termARexxAttributes.c termARexxGlobal.h termARexxAttributes.h
termConsole.oo:			termConsole.c termEmulationProcess.h
termEmulation.oo:		termEmulation.c termEmulationProcess.h
termInit.o:			termInit.c termEmulationProcess.h
termMain.o:			termMain.c termEmulationProcess.h
termMarker.o:			termMarker.c termEmulationProcess.h
termEmulationProcess.oo:	termEmulationProcess.c termEmulationProcess.h
