# Makefile for the screen routines

compiler = tcc -c
options  = -O -d -Z -w

libman = tlib

all: screen.lib
        @echo Screen routines compiled.
        
screen.lib: drawscr.obj lowvideo.obj scrclip.obj screen.obj
        @$(libman) screen.lib + drawscr.obj
        @$(libman) screen.lib + lowvideo.obj
        @$(libman) screen.lib + scrclip.obj
        @$(libman) screen.lib + screen.obj
        @del screen.bak

drawscr.obj: drawscr.c screen.h
        @$(compiler) $(options) drawscr.c

lowvideo.obj: lowvideo.c screen.h ..\mouse\mouse.h ..\c_repl\c-repl.h
        @$(compiler) $(options) lowvideo.c

scrclip.obj: scrclip.c ..\mouse\mouse.h
        @$(compiler) $(options) scrclip.c

screen.obj: screen.asm
        @nasm screen.asm -f obj -o screen.obj

clean:
        @del drawscr.obj
        @del lowvideo.obj
        @del scrclip.obj
        @del screen.obj
        @del screen.lib
