LIBRARY name stays COMM for import resolution. Debug strings updated to KPCOMM. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
72 lines
1.9 KiB
Makefile
72 lines
1.9 KiB
Makefile
# makefile - High-speed COMM.DRV replacement for MSVC 1.52
|
|
#
|
|
# Build: nmake
|
|
# Clean: nmake clean
|
|
#
|
|
# Prerequisites:
|
|
# - MSVC 1.52 (cl, link in PATH)
|
|
#
|
|
# Output is KPCOMM.DRV -- drop-in replacement for stock Windows 3.1 driver.
|
|
#
|
|
# Install:
|
|
# 1. Copy KPCOMM.DRV to \WINDOWS\SYSTEM
|
|
# 2. Edit SYSTEM.INI [boot] section: comm.drv=kpcomm.drv
|
|
# 3. Add to [386Enh] section: COM1FIFO=1 (for each port in use)
|
|
# 4. Restart Windows
|
|
#
|
|
# Key improvements over stock COMM.DRV:
|
|
# - Both RX and TX FIFOs enabled (stock: RX only)
|
|
# - RX trigger level 8 (stock: 14 -- only 2 bytes headroom)
|
|
# - TX burst writes up to 16 bytes per THRE interrupt (stock: 1 byte)
|
|
|
|
CC = cl
|
|
LINK = link
|
|
|
|
# Compiler flags:
|
|
# -c Compile only
|
|
# -W3 Warning level 3
|
|
# -ASw Small model, SS!=DS (Windows DLL)
|
|
# -Gsw No stack probes, Windows prolog/epilog
|
|
# -Ow Safe optimizations for Windows
|
|
# -Zp2 Pack structures on 2-byte boundaries (matches Windows SDK)
|
|
# -Ze Enable Microsoft extensions
|
|
CFLAGS = -c -W3 -ASw -Gsw -Ow -Zp2 -Ze
|
|
|
|
# Linker flags:
|
|
# /NOD No default libraries
|
|
# /NOE No extended dictionary search
|
|
# /AL:16 Segment alignment 16
|
|
LFLAGS = /NOD /NOE /AL:16
|
|
|
|
# Libraries
|
|
# sdllcew Small model DLL C runtime (emulated math, Windows)
|
|
# libw Windows API import library
|
|
LIBS = sdllcew libw
|
|
|
|
# Output
|
|
TARGET = kpcomm.drv
|
|
|
|
# Objects
|
|
OBJS = commdrv.obj isr.obj
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Build rules
|
|
# -----------------------------------------------------------------------
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(OBJS) commdrv.def
|
|
$(LINK) $(LFLAGS) $(OBJS), $(TARGET),,$(LIBS), commdrv.def
|
|
|
|
commdrv.obj: commdrv.c commdrv.h
|
|
$(CC) $(CFLAGS) commdrv.c
|
|
|
|
isr.obj: isr.c commdrv.h
|
|
$(CC) $(CFLAGS) isr.c
|
|
|
|
# -----------------------------------------------------------------------
|
|
# Clean
|
|
# -----------------------------------------------------------------------
|
|
clean:
|
|
-del *.obj
|
|
-del *.drv
|
|
-del *.map
|