all: errmsg.exe exedump.exe scanbind.exe semlist.exe patchany.exe \
	any.exe exe.exe hello.exe nop.exe \
	activity.exe pcdaemon.exe netlock.exe \

.pas.tpu:
	bpc $* /m

.pas.exe:
	bpc $* /m

.asm.obj:
	tasm $* /ml /la /w2 /q

.obj.exe:
	tlink $* /c /s

.exe.bin:
	exe2bin $*

lockbegi.obj: applock.bin
	binobj applock.bin lockbegi LockBegin

lockend.obj: makefile
	binobj nul lockend LockEnd

docbegin.obj: netlock.doc
	binobj netlock.doc docbegin DocBegin

docend.obj: makefile
	binobj nul docend DocEnd

checkio.tpu: checkio.pas options.pas error.tpu

nos.tpu: nos.pas options.pas checkio.tpu

error.tpu: error.pas options.pas

country.tpu: country.pas options.pas

netlock.exe: netlock.pas options.pas ascii.tpu error.tpu checkio.tpu nos.tpu \
	lockbegi.obj lockend.obj docbegin.obj docend.obj
	bpc netlock/m

activity.exe: activity.pas options.pas site.pas ascii.tpu checkio.tpu \
	error.tpu nos.tpu

semlist.exe: semlist.pas options.pas site.pas country.tpu checkio.tpu \
	error.tpu nos.tpu

pcdaemon.exe: pcdaemon.pas options.pas site.pas country.tpu error.tpu

patchany.exe: patchany.pas options.pas site.pas nos.tpu checkio.tpu error.tpu

scanbind.exe: scanbind.pas options.pas site.pas nos.tpu checkio.tpu error.tpu

errmsg.exe: errmsg.pas options.pas site.pas error.tpu

exedump.exe: exedump.pas options.pas site.pas checkio.tpu error.tpu

any.exe: any.obj hello.exe patchany.exe
	tlink any /c /s
	patchany any.exe hello.exe

clean:
	del *.exe
	del *.bin
	del *.obj
	del *.tpu
	del *.lst
	del *.map
	del *.unl
	del *.lok
	del *.uue
	del *.zip
	del *.old
	del *.bak
	del *.tmp
	del *.$$$
	del *.&*
	del t.*
	del mark.doc

compress: netlock.exe activity.exe pcdaemon.exe semlist.exe scanbind.exe \
	patchany.exe exedump.exe errmsg.exe
	- lzexe netlock
	del netlock.old
	- lzexe activity
	del activity.old
	- lzexe pcdaemon
	del pcdaemon.old
	- lzexe semlist
	del semlist.old
	- lzexe scanbind
	del scanbind.old
	- lzexe patchany
	del patchany.old
	- lzexe exedump
	del exedump.old
	- lzexe errmsg
	del errmsg.old

netlock.uue: netlock.exe
	del netlock.uue
	uuencode -s 480 -h 20 netlock.exe

netloc14.zip: all compress
	del netloc14.zip
	del mark.doc
	zip -9 netloc14 *.exe *.pas *.asm makefile
	zip -9 netloc14 *.doc *.dat *.res *.1st

distribute: netloc14.zip
