#
#Makefile for Apple //e Emulator
#
#Note: On sgi system OPT should be:
#OPT = -O -Olimit 1500
#
#
OPT = -O -Olimit 1500
#
LIB = -lgl_s


#Apple.II is split up as follows:
OBJ = main.o 6502.o mega2.o debug.o extras.o graphics.o

apple2eg  : $(OBJ)
	cc $(OPT) -o apple2eg $(OBJ) $(LIB)
	strip apple2eg

#Building modules from source:
main.o: main.c apple.h
	cc -c  $(OPT) main.c
extras.o : extras.c apple.h
	cc -c  $(OPT) extras.c
6502.o: 6502.c apple.h
	cc -c  $(OPT) 6502.c
mega2.o: mega2.c apple.h
	cc -c  $(OPT) mega2.c
debug.o: debug.c apple.h
	cc -c  $(OPT) debug.c
graphics.o: graphics.c apple.h
	cc -c  $(OPT) graphics.c

FILES = Makefile apple.h main.c mega2.c 6502.c extras.c debug.c graphics.c\
	pri.font alt.font
dist :
	tar cvf ap2egl.tar $(FILES) 
	compress -f ap2egl.tar

