#	makefile for DOTS
#
DOTS = dots.obj g31.obj g32.obj scr_ci.obj 
CFLAGS= -v -ml -w-par -w-rvl -w-pia

dots.exe: dots.obj g31.obj g32.obj scr_ci.obj gtc.obj 
	tcc $(CFLAGS) $(DOTS) gtc.obj graphics.lib

dotshi.exe: dots.obj g31.obj g32.obj scr_ci.obj ghi.obj config.obj
	tcc $(CFLAGS) -edotshi $(DOTS) ghi.obj config.obj graphics.lib

dotshp.exe: dots.obj g31.obj g32.obj scr_ci.obj ghp.obj config.obj
	tcc $(CFLAGS) -edotshp $(DOTS) ghp.obj config.obj graphics.lib

dotsli.exe: dots.obj g31.obj g32.obj scr_ci.obj gli.obj config.obj
	tcc $(CFLAGS) -edotsli $(DOTS) gli.obj config.obj graphics.lib

dotsps.exe: dots.obj g31.obj g32.obj scr_ci.obj gps.obj config.obj
	tcc $(CFLAGS) -edotsps $(DOTS) gps.obj config.obj graphics.lib

g31.obj: g31.c
g32.obj: g32.c g.h g3.h
dots.obj: dots.c g3.h g.h scr_ci.h
scale.obj: scale.c
scr_ci.obj: scr_ci.c scr_ci.h
config.obj: config.c config.h

gtc.obj: gtc.c g.h
ghi.obj: ghi.c g.h config.h
ghp.obj: ghp.c g.h config.h
gli.obj: gli.c g.h config.h
gps.obj: gps.c gps.h g.h config.h
gz.obj: gz.c

.c.obj:
	tcc -c $(CFLAGS) $* 

dots:  dots.exe     dotshi.exe    dotshp.exe    \
	   dotsli.exe   dotsps.exe    

distrib: dots.zip
dots.zip: dots.c dots.doc spiral test.bat makefile shrink.bat     \
	   dots.exe     dotshi.exe    dotshp.exe    \
	   dotsli.exe   dotsps.exe    egavga.bgi	\
	   herc.bgi ibm8514.bgi pc3270.bgi att.bgi cga.bgi dots.fil readme
	-shrink dots
	-shrink dotshi
	-shrink dotshp
	-shrink dotsli
	-shrink dotsps
	pkzip -u dots @dots.fil

clean:
	erase dots.obj
	erase dots.old
	erase dotshi.old
	erase dotshp.old
	erase dotsli.old
	erase dotsps.old
