#
# Makefile for the DOS target, using Turbo C v2.01
#

all: uhex.com

uhex.com: uhex.c file.c io.c
	tcc -mt -lt -f- -O -Z -d uhex.c file.c io.c
	upx --8086 -9 uhex.com

clean:
	del uhex.com
	del *.obj

pkg: uhex.com
	mkdir appinfo
	copy uhex.lsm appinfo
	mkdir progs
	mkdir progs\uhex
	copy uhex.lsm appinfo
	copy uhex.com progs\uhex
	copy *.txt progs\uhex
	mkdir source
	mkdir source\uhex
	copy *.c source\uhex
	copy *.h source\uhex
	copy *.txt source\uhex
	copy *.lsm source\uhex
	copy *.bat source\uhex
	copy Makefile.* source\uhex
	mkdir links
	copy uhex.bat links
	zip -9 -r uhex.zip appinfo progs links source
	deltree /y appinfo
	deltree /y links
	deltree /y progs
	deltree /y source
