#### Makefile for Z80Em
# Following #defines can be used:
# DEBUG			Compile with builtin debugger
# LSB_FIRST		Compile for a low-endian machine
# X86_ASM		Use inline 80x86 assembly (GCC only)

CFLAGS	= -g #-O2 -fomit-frame-pointer -DLSB_FIRST #-DDEBUG # -Wall

CC	= gcc $(CFLAGS)	# C compiler used
LD	= gcc $(CFLAGS)	# Linker used

all:    z80dasm

Z80Dasm.o:  Z80Dasm.c
z80dasm:    Z80Dasm.o z80.o
	$(LD) -o z80dasm Z80Dasm.o z80.o # -s

Z80.o:      Z80.c Z80.h Z80Codes.h Z80IO.h Z80DAA.h
z80.o:      z80.c Z80.h Z80Codes.h Z80IO.h Z80DAA.h
Z80Dasm.o: Z80Dasm.h

clean:
	rm -f z80dasm *.o

tar:
	make clean
	tar -cvf z80.tar .
