#
# Computer Simulation Classes Makefile
#
# Mainly, this file consists of dependancies for the classes provided.
# If you are going to use these classes, you'll have to add to it your
# main program or whatever and put in the appropriate lines.
#


#
# Object Lists:
#

GENOBJS	=	Adder.o ANDGate.o Decoder.o Decrementor.o Gate.o Incrementor.o \
		IndexRegister.o Inverter.o Memory.o Merger.o MUX.o Node.o One.o \
		ORGate.o Register.o Splitter.o SRFlipFlop.o Timer.o TriStateBuffer.o \
		XNORGate.o XORGate.o compmath.o utility.o


#
# General Dependancies:
#

D_NODE			= Node.h

D_ONE			= One.h			${D_NODE}
D_GATE			= Gate.h		${D_NODE}
D_ADDER			= Adder.h		${D_NODE}
D_INVERTER		= Inverter.h		${D_NODE}
D_MERGER		= Merger.h		${D_NODE}
D_REGISTER		= Register.h		${D_NODE}
D_SPLITTER		= Splitter.h		${D_NODE}
D_SRFLIPFLOP		= SRFlipFlop.h		${D_NODE}
D_TRISTATEBUFFER	= TriStateBuffer.h	${D_NODE}

D_ANDGATE		= ANDGate.h		${D_NODE} ${D_GATE}
D_ORGATE		= ORGate.h		${D_NODE} ${D_GATE}
D_XORGATE		= XORGate.h		${D_NODE} ${D_GATE}
D_XNORGATE		= XNORGate.h		${D_NODE} ${D_GATE}


D_DECREMENTOR		= Decrementor.h		${D_NODE} ${D_ADDER}
D_INCREMENTOR		= Incrementor.h		${D_NODE} ${D_ONE} ${D_ADDER}
D_INDEXREGISTER		= IndexRegister.h	${D_NODE} ${D_REGISTER} ${D_INCREMENTOR} \
						${D_DECREMENTOR} ${D_MUX} ${D_ORGATE} ${D_MERGER}
D_TIMER			= Timer.h		${D_NODE} ${D_REGISTER} ${D_INCREMENTOR} \
						${D_XNORGATE} ${D_ANDGATE} ${D_MUX}

D_COMPMATH		= compmath.h		${D_NODE}
D_UTILITY		= utility.h

D_DECODER		= Decoder.h		${D_NODE} ${D_COMPMATH}
D_MEMORY		= Memory.h		${D_NODE} ${D_COMPMATH} ${D_UTILITY}
D_MUX			= MUX.h			${D_NODE} ${D_COMPMATH}

Adder.o:		Adder.m			${D_ADDER}
ANDGate.o:		ANDGate.m		${D_ANDGATE}
Decoder.o: 		Decoder.m		${D_DECODER}
Decrementor.o:		Decrementor.m		${D_DECREMENTOR}
Gate.o:			Gate.m			${D_GATE}
Incrementor.o:		Incrementor.m		${D_INCREMENTOR}
IndexRegister.o:	IndexRegister.m		${D_INDEXREGISTER}
Inverter.o:		Inverter.m		${D_INVERTER}
Memory.o:		Memory.m		${D_MEMORY}
Merger.o:		Merger.m		${D_MERGER}
MUX.o:			MUX.m			${D_MUX}
Node.o:			Node.m			${D_NODE}
One.o:			One.m			${D_ONE}
ORGate.o:		ORGate.m		${D_ORGATE}
Register.o:		Register.m		${D_REGISTER}
Splitter.o:		Splitter.m		${D_SPLITTER}
SRFlipFlop.o:		SRFlipFlop.m		${D_SRFLIPFLOP}
Timer.o:		Timer.m			${D_TIMER}
TriStateBuffer.o:	TriStateBuffer.m	${D_TRISTATEBUFFER
XNORGate.o:		XNORGate.m		${D_XNORGATE}
XORGate.o:		XORGate.m		${D_XORGATE}

compmath.o:		compmath.m ${D_COMPMATH}
utility.o:		utility.c ${D_UTILITY}


#
# Automatic File Conversions:
#

.c.o:	; cc -c -g -o $@ $<
.m.o:	; cc -c -g -o $@ $<


#
# End of file.
#