CC = bcc
INCPATH = $(KERNEL)
KLIBPATH = kernel
# DEBUG = -v
CFLAGS = $(DEBUG) -ml! -O2 -I$(INCPATH) -I$(INCLUDEPATH) -L$(LIBPATH);$(KLIBPATH) -2
OBJS = rommaker.obj wpatch.obj patch.obj list.obj rpatch.obj romsbos.obj
LIBS = $(KLIBPATH)\iw_osl.lib

.autodepend

.c.obj:
	bcc +tmp.cfg { $*.c}

all : tmp.cfg rommaker.exe

dist:

tmp.cfg:
  copy &&|
-c
$(CFLAGS)
| tmp.cfg

rommaker.exe : $(OBJS) $(LIBS)
	makersp "%s " &&|
 	-c
	-map
	$(DEBUG)
	c0l.obj
	$(OBJS)
|	> rsp.txt
	tlink -L$(LIBPATH) @rsp.txt , rommaker.exe,,$(LIBS)+cl.lib
	del tmp.cfg

clean:
	rm -f *.obj
	rm -f *.bak
	rm -f *.lib
	rm -f therom.fff
	rm -f therom.dat

cleanall: clean
	rm -f kernel/*.lib
	rm -f kernel/*.obj
