# $Id: Smakefile,v 1.3 1994/05/15 11:47:21 jraja Exp $
#
# Smakefile for msg
#
# Copyright  1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
#                  Helsinki University of Technology, Finland.
#                  All rights reserved.
#
# $Log: Smakefile,v $
# Revision 1.3  1994/05/15  11:47:21  jraja
# Removed usr.lib from libraries.
#
# Revision 1.2  1994/03/09  01:52:17  jraja
# Updated for the first release.
#
# Revision 1.1  1993/11/19  03:19:40  jraja
# Initial revision
#
#

MAKE = smake
RM= delete
CC= sc
RPCCOM = rpcgen
LD= slink

#
# Note that we have selected the register argument version of the rpc
# library and the SCOPTIONS file has PARAMETERS option set to REGISTER.
#
LIBS= LIB NETLIB:rpcr.lib NETLIB:net.lib

BIN = printmsg msg_svc rprintmsg
GEN = msg_clnt.c msg_svc.c msg_xdr.c msg.h

all: $(BIN)

#
# This is the non-networked version of the program
#
printmsg: printmsg.o
	$(CC) LINK TO $@ OBJ printmsg.o

#
# note: the generated xdr file is virtually empty.
#
$(GEN): msg.x
	$(RPCCOM) msg.x

msg_svc: msg_proc.o msg_svc.o
	$(CC) LINK TO $@ OBJ msg_proc.o msg_svc.o $(LIBS)

rprintmsg: rprintmsg.o msg_clnt.o
	$(CC) LINK TO $@ OBJ rprintmsg.o msg_clnt.o $(LIBS)

rprintmsg.o: rprintmsg.c msg.h

msg_proc.o: msg_proc.c msg.h

clean cleanup:
	-$(RM) \#?.(o|asm|map|lnk) $(GEN) $(BIN) \#?!
