# This Makefile assumes you have GNU gcc 2.3 or better and a suitable
# runtime library with object support.  It also works on a NeXT.  Don't know
# about Stepstone.

..SUFFIXES: .obj .m
%.obj: %.m
	$(CC) -c $(CFLAGS) $<

# Use this on a NeXT
#CC=		cc
#LIBS=		
# Use this with GNU CC on a non-NeXT.
CC=		gcc
LIBS=		-lobjc

CFLAGS=		-Wall -O2 -g -Wno-import
OFILES=		main.obj Node.obj Queue.obj Stack.obj Float.obj Char.obj

demo.exe: $(OFILES)
	$(CC) $(CFLAGS) $(LDFLAGS) -o demo.exe $(OFILES) $(LIBS)

clean:
	rm -f $(OFILES) demo.exe
	
Char.obj : Char.m Char.h 

Float.obj : Float.m Float.h 

Node.obj : Node.m Node.h 

Queue.obj : Queue.m Queue.h Node.h 

Stack.obj : Stack.m Stack.h Node.h 

main.obj : main.m Queue.h Node.h Stack.h Float.h
