# Makefile for C reboot library
ASM   = tasm
LINK  = tlink
TPC   = tpc55
CHASM = chasm
CC    = tcc

.asm.obj:
	$(ASM) /mx /la $<

all:	c-reb-s.com c-reboot.exe reb.com reb-ta.com reboot.exe

c-reb-s.com: c-reb-s.obj reblib-s.obj
	$(CC) -mt -lt -ec-reb-s c-reb-s.obj reblib-s.obj

c-reb-s.obj: c-reboot.c
	$(CC) -mt -c c-reboot.c
	ren c-reboot.obj c-reb-s.obj

c-reboot.exe: c-reboot.obj reblibl.obj
	$(CC) -ml -ec-reboot c-reboot.obj reblibl.obj

c-reboot.obj: c-reboot.c
	$(CC) -ml -c c-reboot.c

reb-ta.com: reb-ta.obj
	$(LINK) /t reb-ta.obj

reb.com: reb.asm
	$(CHASM) reb.asm

reboot.exe: reboot.pas
	$(TPC) reboot.pas
