# $Id: Smakefile,v 1.4 1993/10/14 00:04:15 ppessi Exp $
#
# Smakefile for letnet
#
# Copyright  1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
#                  Helsinki University of Technology, Finland.
#                  All rights reserved.
#
# Created      : Mon Mar 22 07:17:50 1993 ppessi
# Last modified: Sat Oct  9 00:11:11 1993 ppessi
#
# $Log: Smakefile,v $
# Revision 1.4  1993/10/14  00:04:15  ppessi
# SCOPTIONS is now created automatically from Smakefile
#
# Revision 1.3  1993/08/12  09:05:03  jraja
# Changed email address.
#
# Revision 1.2  1993/05/23  17:57:57  ppessi
# Moved stuff to SCOPTIONS
#
# Revision 1.1  1993/05/14  23:39:48  ppessi
# Initial revision
#

PROG = letnet

MAKE = smake

RM= delete
CC= sc
LD= slink

SRC= $(PROG).c 
OBJS= $(PROG).o sender.o
LIBS= LIB NETLIB:net.lib 

OPTFLAGS= Optimize Stripdebug NoDebug
DEBUGFLAGS= NoOptimize DEBUG=FULLFLUSH

DEFS="DEF=RCS_ID_C=static char *rcsid" \
      DEF=AMIGA 
IDIRS=  IDIR=netinclude: 
SCFLAGS= STRINGMERGE STRUCTUREEQUIVALENCE \
	 NOSTACKCHECK NOMULTIPLEINCLUDES \
	 NOERRORSOURCE NOVERSION NOERRORHIGHLIGHT \
	 SMALLCODE SMALLDATA \
	 MAP MAPHUNK MAPSYMBOLS MAPLIB MAPXREFERENCE \
	 LINKEROPTIONS=plain NOICONS \
	 OPTINL OPTTIME OPTCOMP=5 OPTDEP=5 OPTRDEP=5 \
	 $(IDIRS) $(DEFS) \
	 IGN 100,154,161,224 NOSTANDARDIO 


$(PROG): SCOPTIONS $(OBJS)
	$(CC) LINK TO $@ OBJ $(OBJS) BATCH $(LIBS) NOSTDIO

$(PROG)1: SCOPTIONS $(OBJS)
	$(CC) LINK TO $@ OBJ $(OBJS) netlib:autoinit1.o BATCH $(LIBS)

$(PROG)2: SCOPTIONS $(OBJS)
	$(CC) LINK TO $@ OBJ $(OBJS) netlib:autoinit2.o BATCH $(LIBS)

SCOPTIONS: Smakefile
	copy to $@ <from < 
$(OPTFLAGS) $(SCFLAGS) 
<

# smake clean debug all to make a debugging version
DEBUG:
	copy to SCOPTIONS <from < 
$(DEBUGFLAGS) $(SCFLAGS) 
<

clean:
	-$(RM) \#?.o \#?.map \#?.lnk SCOPTIONS

letnet.s: letnet.c
	touch letnet.s
	$(CC) $(CFLAGS) Disasm=letnet.s $<	

# DO NOT DELETE THIS LINE -- make depend depends on it.
letnet.o: letnet.c letnet.h
sender.o: sender.c letnet.h

