# MCM - Multiuser Communications Manager
# Copyright (C) 1991,2 Michael Sawyer
# See docs file for details

all: mcm

# If not using an ANSI compiler, MAKE SURE you make the necessary changes
# in the mcm.h file!!!
CC = cc -g

# If you chose the Curses mode in mcm.h, change this to your curses library
LIBS = -ltermcap

# If you have to look somewhere wierd for Include files, include it here
# Sun Curses will need "-I /usr/5include"
INCLUDES =

.c.o :
	$(CC) -c $< $(INCLUDES)

mcm: mcm.o mcmsplit.o mcmperson.o $(EXTRAOBJS)
	$(CC) mcm.o mcmsplit.o mcmperson.o $(LIBS) $(EXTRAOBJS) -o mcm 

mcm.o: mcm.c mcm.h
mcmsplit.o: mcmsplit.c mcm.h
mcmperson.o: mcmperson.c mcm.h

official:
	-rm *.o
	@make mcm

clean:
	-rm *.o

# Personality modes should go here

dd:
	$(CC) -c mcmperson_dd.c $(INCLUDES)
	yes | mv mcmperson_dd.o mcmperson.o
	@make mcm

sr:
	$(CC) -c mcmperson_sr.c $(INCLUDES)
	yes | mv mcmperson_sr.o mcmperson.o
	@make mcm

# Hopcraft's script-based personality modules

hop:
	$(CC) -c mcmperson_hop.c $(INCLUDES)
	yes | mv mcmperson_hop.o mcmperson.o
	@make mcm EXTRAOBJS="glue.o dnd.o arm.o generic.o"
glue.o: glue.c mcm.h glue.h
dnd.o: dnd.c mcm.h
arm.o: arm.c mcm.h


# Make a distribution file -- Do not use

dist:
	newtar -cvf hopcraft.tar `cat hdistrib`
	newtar -czvf mcm12.tar.Z `cat distrib`
	-rm mcm12.uu
	uuencode mcm12.tar.Z < mcm12.tar.Z > mcm12.uu

