#
#Makefile for Apple //e Emulator
#
#Note: On sgi system OPT should be:
#OPT = -O -Olimit 1500
#Note: On Sun systems (and those without beep()) OPT should be:
#OPT = -O -DNOBEEP
#
#	if your loader cannot resolve beep() then add -DNOBEEP to the
#	OPT line
#	if your system does not support the time system calls add
#	-DNOTIME to the OPT line
#
OPT = -O -Olimit 1500
#
LIB = -lcurses -ltermcap


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

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

#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

FILES = Makefile apple.h main.c mega2.c 6502.c extras.c debug.c

dist :
	tar cvf ap2e.tar $(FILES)
	compress -f ap2e.tar
