aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-12-18 21:25:34 +0100
committerJavier <dev.git@javispedro.com>2022-12-18 21:25:34 +0100
commit831d16b852dc13a9f5ff7a1b56302f94ed193565 (patch)
treef2f4d1e7c6e9d8cb69504dd637a760265b498ad6 /makefile
parentae74cf99ea1513b7bd03e3a39fa49d3b715f225e (diff)
downloadvbados-831d16b852dc13a9f5ff7a1b56302f94ed193565.tar.gz
vbados-831d16b852dc13a9f5ff7a1b56302f94ed193565.zip
slight makefile cleanups
Diffstat (limited to 'makefile')
-rw-r--r--makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/makefile b/makefile
index aa727bb..907a8e5 100644
--- a/makefile
+++ b/makefile
@@ -1,6 +1,12 @@
# This is an Open Watcom wmake makefile, not GNU make.
# Assuming you have sourced `owsetenv` beforehand.
+# All binaries to build
+bins = vbmouse.exe vbsf.exe vbmouse.drv
+
+# Inf files
+infs = oemsetup.inf
+
# Object files for vbmouse
mousedos_objs = mousetsr.obj mousmain.obj kitten.obj vbox.obj
mousew16_objs = mousew16.obj
@@ -20,8 +26,8 @@ dostsr_cflags = $(dos_cflags) -DIN_TSR -zu -s -g=RES_GROUP -nd=RES -nt=RES_TEXT
# -s to disable stack checks, since it inserts calls to the runtime from the TSR part
# -zu since ss != ds on the TSR
-# Compiler arguments for W16 files
-w16_cflags = -bt=windows -bd -mc -zu -s -6 -osi -w3 -wcd=202
+# Compiler arguments for W16 .DLL/.DRV files
+w16dll_cflags = -bt=windows -bd -mc -zu -s -6 -osi -w3 -wcd=202
# -bd to build DLL
# -mc to use compact memory model (far data pointers, ss != ds in a DLL)
# -zu for DLL calling convention (ss != ds)
@@ -30,13 +36,13 @@ w16_cflags = -bt=windows -bd -mc -zu -s -6 -osi -w3 -wcd=202
# Full compiler command lines
compile_dos = *wcc -fo=$^@ $(dos_cflags) $[@
compile_dostsr = *wcc -fo=$^@ $(dostsr_cflags) $[@
-compile_w16 = *wcc -fo=$^@ $(w16_cflags) $[@
+compile_w16dll = *wcc -fo=$^@ $(w16dll_cflags) $[@
.BEFORE:
# We need DOS and Windows headers, not host platform's
set include=$(%watcom)/h/win;$(%watcom)/h
-all: vbmouse.exe vbmouse.drv vbsf.exe .SYMBOLIC
+all: $(bins) .SYMBOLIC
# DOS mouse driver
vbmouse.exe: vbmouse.lnk $(mousedos_objs)
@@ -53,7 +59,7 @@ vbmouse.drv: mousew16.lnk $(mousew16_objs)
*wlink @$[@ name $@ file { $(mousew16_objs) }
mousew16.obj: mousew16.c .AUTODEPEND
- $(compile_w16)
+ $(compile_w16dll)
# DOS shared folders
vbsf.exe: vbsf.lnk $(sfdos_objs)
@@ -82,10 +88,10 @@ vbados.flp:
mcopy -i $^@ nls/vbsf.* nls/vbmouse.* ::
# Build a floppy image containing the driver
-flp: vbados.flp vbmouse.exe vbmouse.drv oemsetup.inf vbsf.exe .SYMBOLIC
- mcopy -i vbados.flp -o vbmouse.exe vbmouse.drv oemsetup.inf vbsf.exe ::
+flp: vbados.flp $(bins) $(infs) .SYMBOLIC
+ mcopy -i vbados.flp -o $(bins) $(infs) ::
# Build a zip with the driver binaries
zip: vbmouse.exe vbmouse.drv oemsetup.inf vbsf.exe .SYMBOLIC
zip --DOS-names -fz- -j vbados.zip nls/*.tbl nls/vbsf.* nls/vbmouse.*
- zip --DOS-names -fz- vbados.zip vbmouse.exe vbmouse.drv oemsetup.inf vbsf.exe
+ zip --DOS-names -fz- vbados.zip $(bins) $(infs)