diff options
author | Javier <dev.git@javispedro.com> | 2022-03-29 01:15:53 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-03-29 01:15:53 +0200 |
commit | a816d1a09b1045fb5c155ac73f3231fcf9d93180 (patch) | |
tree | c4e31e850b9f2afb36acd6119483cf350c33f596 /makefile | |
parent | 67ebca92621aef31ff97705013456e95e60f7fbe (diff) | |
download | vbados-a816d1a09b1045fb5c155ac73f3231fcf9d93180.tar.gz vbados-a816d1a09b1045fb5c155ac73f3231fcf9d93180.zip |
initial import of DOS mouse driver
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 45 |
1 files changed, 34 insertions, 11 deletions
@@ -1,26 +1,49 @@ # This is an Open Watcom wmake makefile, not GNU make. # Assuming you have sourced `owsetenv` beforehand. +# +dosobjs = dostsr.obj dosmain.obj vbox.obj +doscflags = -bt=dos -ms -s -6 -os -w3 +# -ms to use small memory model +# -s to disable stack checks, since it inserts calls to the runtime from the TSR part +# -os to optimize for size + +w16objs = w16mouse.obj +w16cflags = -bt=windows -bd -mc -zu -s -6 -w3 +# -bd to build DLL +# -mc to use compact memory model (far data pointers, since ss != ds) +# -zu for DLL calling convention (ss != ds) +# -s to disable stack checks, since the runtime uses MessageBox() to abort (which we can't call from mouse.drv) .BEFORE: # We need DOS and Windows headers, not host platform's set include=$(%watcom)/h/win;$(%watcom)/h -# The main driver file -vbmouse.drv: mousew16.c mousew16.h vbox.c vbox.h vboxdev.h ps2.h pci.h vds.h int2fwin.h - # -bd to build DLL - # -mc to use compact memory model (far data pointers, since ss != ds) - # -zu for DLL calling convention (ss != ds) - # -zc put constants on the code segment (cs) - # -s to disable stack checks, since the runtime uses MessageBox() to abort (which we can't call from mouse.drv) - wcl -6 -mc -bd -zu -zc -s -bt=windows -l=windows_dll @vbmouse.lnk -fe=$^@ mousew16.c vbox.c +# Main DOS driver file +vbmouse.exe: dosmouse.lnk $(dosobjs) + wlink @$[@ name $@ file { $(dosobjs) } + +dostsr.obj: dostsr.c .AUTODEPEND + wcc -fo=$^@ $(doscflags) -g=RES_GROUP -nd=RES -nt=RES_TEXT -nc=RES_CODE $[@ + +dosmain.obj: dosmain.c .AUTODEPEND + wcc -fo=$^@ $(doscflags) $[@ + +vbox.obj: vbox.c .AUTODEPEND + wcc -fo=$^@ $(doscflags) $[@ + +vbmouse.drv: w16mouse.lnk $(w16objs) + wlink @$[@ name $@ file { $(w16objs) } + +w16mouse.obj: w16mouse.c .AUTODEPEND + wcc -fo=$^@ $(w16cflags) $[@ clean: .SYMBOLIC - rm -f vbmouse.drv vbmouse.flp *.o + rm -f vbmouse.exe vbmouse.drv vbmouse.flp *.obj *.map vbmouse.flp: mformat -C -f 1440 -v VBMOUSE -i $^@ :: # Build a floppy image containing the driver -flp: vbmouse.flp vbmouse.drv oemsetup.inf .SYMBOLIC - mcopy -i vbmouse.flp -o oemsetup.inf vbmouse.drv :: +flp: vbmouse.flp vbmouse.exe vbmouse.drv .SYMBOLIC + mcopy -i vbmouse.flp -o vbmouse.exe vbmouse.drv :: |