CC      = gcc
CFLAGS  = -O2 -DLSB_FIRST -DVGA -DSOUND #-DDEBUG
OBJECTS = nes9x.o mapper.o M6502.o Debug.o
OBJAT = video.o svga.o keys.o misc.o
OBJ98 = dmysnd.o
SOURCE1 = nes9x.c mapper.c M6502.c Debug.c video.c svga.c keys.c misc.c dmysnd.c
SOURCE2 = nes9x.h M6502.h Codes.h Tables.h video.h vgakeybo.h palette.h sb.h makefile

ARC = pkzip -a
VER = 01
BINARC = nes9x${VER}.zip
SRCARC = nes9x${VER}s.zip

all: nes9x.exe 
nes9x.exe: ${OBJECTS} ${OBJAT}
        ${CC} -s -o nes9x ${OBJECTS} ${OBJAT}

zip: ${BINARC} ${SRCARC}

dasm:	dasm.c
	${CC} -o dasm dasm.c

M6502.o:	M6502.c M6502.h Tables.h Codes.h
Debug.o:	Debug.c M6502.h
nes9x.o: nes9x.c nes9x.h m6502.h
mapper.o: mapper.c nes9x.h
misc.o: misc.c
