#
# This is a Makefile to build Zmiy using the Open Watcom compiler
#
# You can use following targets:
#
#  make           - compiles the game
#  make clean     - cleans up all non-source files
#  make buildpkg  - creates a FreeDOS package with the game
#

all: zmiy.exe

zmiy.exe: zmiy.c io.c levels.c timer.c
	wcl -0 -y -cc -wx -ms -lr -we -d0 -s -ox zmiy.c io.c levels.c timer.c
	upx --8086 -9 zmiy.exe

buildpkg: zmiy.exe .SYMBOLIC
	if exist zmiy.zip del zmiy.zip
	mkdir games
	mkdir games\zmiy
	mkdir source
	mkdir source\zmiy
	mkdir appinfo
	copy *.c source\zmiy
	copy *.h source\zmiy
	copy *.txt source\zmiy
	copy *.lsm source\zmiy
	copy Makefile.* source\zmiy
	copy zmiy.exe games\zmiy
	copy *.txt games\zmiy
	copy zmiy.lsm appinfo
	zip -m -k -r -9 zmiy.zip games appinfo source

clean: .SYMBOLIC
	del zmiy.exe
	del *.obj
