aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-02-27 17:40:45 +0100
committerJavier <dev.git@javispedro.com>2022-02-27 18:28:02 +0100
commitdee9ca901fd3f2edec7af8f82300257b285067b0 (patch)
tree04907d71f81b80de8e8ccff4373fba13fa3a93b4 /makefile
downloadvbados-dee9ca901fd3f2edec7af8f82300257b285067b0.tar.gz
vbados-dee9ca901fd3f2edec7af8f82300257b285067b0.zip
initial import
Diffstat (limited to 'makefile')
-rw-r--r--makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..1366864
--- /dev/null
+++ b/makefile
@@ -0,0 +1,26 @@
+# This is an Open Watcom wmake makefile, not GNU make.
+# Assuming you have sourced `owsetenv` beforehand.
+
+.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
+ # -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
+
+clean: .SYMBOLIC
+ rm -f vbmouse.drv vbmouse.flp *.o
+
+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 ::
+