#
# @(#)Makefile	2.0 4/14/95
#


OFILES = main.o random.o util.o send.o buffers.o \
	type1.o type2.o getfrom.o stats.o keymgt.o


#some debuging code checks for this flag being defined.
#choose the first if you do not want the debuging code
DEBUGING=
#DEBUGING= -DDEBUGING

CFLAGS = -g

#If you are compiling under Solaris, you may need to uncomment this line.
#LDFLAGS = -L/usr/ucblib -lucb


CC=gcc

#
# Following provides automatic dependencies on SunOS
#

.KEEP_STATE:

#
# Actually do the compilation...
#

all:		 mixmaster

mixmaster:	$(OFILES) rsaref.a
	$(CC) $(CFLAGS) $(OFILES) rsaref.a -o mixmaster $(LDFLAGS)
	chmod 4711 mixmaster

main.o:		main.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c main.c -o main.o $(CPPFLAGS) $(CFLAGS)

random.o:	random.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c random.c -o random.o $(CPPFLAGS) $(CFLAGS)

util.o:		util.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c util.c -o util.o $(CPPFLAGS) $(CFLAGS)

send.o:		send.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c send.c -o send.o $(CPPFLAGS) $(CFLAGS)

buffers.o:	buffers.c buffers.h def.h
		$(CC) -c buffers.c -o buffers.o $(CPPFLAGS) $(CFLAGS)

type1.o:	type1.c mixmaster.h
		$(CC) -c type1.c -o type1.o $(CPPFLAGS) $(CFLAGS)

type2.o:	type2.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c type2.c -o type2.o $(CPPFLAGS) $(CFLAGS)

getfrom.o:	getfrom.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c getfrom.c -o getfrom.o $(CPPFLAGS) $(CFLAGS)

stats.o:	stats.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c stats.c -o stats.o $(CPPFLAGS) $(CFLAGS)

keymgt.o:	keymgt.c mixmaster.h crypt.h buffers.h def.h
		$(CC) -c keymgt.c -o keymgt.o $(CPPFLAGS) $(CFLAGS)

