# MAKEFILE for the MUL8 mz80 space invaders emulator by Zan..
# requires 32bit nasm to obtain mz80.o..
# What flags should be used????????????????? please help here!
# could this MAKEFILE be improved?????????
# anyway, I'm using the same CFLAGS as AMOAD but....
# -Wall (warn all) switch off until allegro implemented

CC   = gcc
ASM  = nasm
#ASM = nasmw
CFLAGS	= -funroll-loops -fomit-frame-pointer -O3 -Wall
#CFLAGS = -funroll-loops -fomit-frame-pointer -O3
VERSION = invmz005


invmz.exe:	mz80.o $(VERSION).o
			$(CC) -s -o invmz.exe $(VERSION).o mz80.o -lalleg


$(VERSION).o:	$(VERSION).c
			$(CC) $(CFLAGS) -c $(VERSION).c


mz80.asm:       makez80.c
	 		$(CC) -o makez80.exe makez80.c
			makez80 mz80.asm -s 


mz80.o:	        mz80.asm
			$(ASM) -f coff mz80.asm


clean:
			del *.exe
			del *.o
			del mz80.asm


debug:
			del invmz.exe
			del $(VERSION).o




# Here is some other stuff...
#--------------------------------------
# I saw that the MAME MAKEFILE uses some different switches
# for makez80.  dunno what they mean actually, but here they are....
# anybody know? -m -h???
#---------------------------------------
# mz80.asm:       makez80.c
#	 		$(CC) -o makez80.exe makez80.c
#			makez80 mz80.asm -s -m -h
#---------------------------------------



