head	1.1;
access;
symbols
	pkgsrc-2026Q1:1.1.0.6
	pkgsrc-2026Q1-base:1.1
	pkgsrc-2025Q4:1.1.0.4
	pkgsrc-2025Q4-base:1.1
	pkgsrc-2025Q3:1.1.0.2
	pkgsrc-2025Q3-base:1.1;
locks; strict;
comment	@# @;


1.1
date	2025.07.04.16.30.12;	author hauke;	state Exp;
branches;
next	;
commitid	DD6KGSoUeHyyPr1G;


desc
@@


1.1
log
@ntvcm is a tool to run i8080/Z80 .COM binaries in CP/M 2.2 emulation.

Console input/output works for both BIOS and BDOS APIs.

Disk input/output works via the BDOS API. There is no attempt at
emulating physical disks. Applications that use BDOS for disk I/O will
work, but applications that use the BIOS, or assume things about disk
layout, will not.

For example, assuming CP/M 2.2's asm.com and load.com are in the
current directory, this will assemble test.asm and generate test.com
on Windows, Linux, or MacOS:

% ntvcm asm test
& ntvcm load test
@
text
@$NetBSD$

Make LFLAGS and CFLAGS overridable

Drop optimization from CFLAGS, pkgsrc does that

Remove ls(1) call, GNU long opts are not portable

Print compiler command lines always

--- makefile.orig	2025-07-02 22:41:46.000000000 +0000
+++ makefile
@@@@ -27,14 +27,15 @@@@ FILES	= *.cxx *.hxx LICENSE README.md ma
 OBJECTS	= $(SOURCES:.cxx=.o)
 OUTPUT	= $(PROGRAM).out
 LANG	= LANG_$(shell (echo $$LANG | cut -f 1 -d '_'))
-COMMIT	!= git log -1 HEAD --format=%h 2> /dev/null
-BUILD	!= printf "%04d" $(shell git rev-list --count HEAD 2> /dev/null)
+#COMMIT	!= git log -1 HEAD --format=%h 2> /dev/null
+#BUILD	!= printf "%04d" $(shell git rev-list --count HEAD 2> /dev/null)
 UNAME	!= uname
 CC	= g++
 
-LIBS	= 
-LFLAGS	= -static
-CFLAGS	= -ggdb -fno-builtin -I .
+#LIBS	= 
+
+LFLAGS	+= -static
+CFLAGS	+= -ggdb -fno-builtin -I .
 
 ifndef VERBOSE
 VERBOSE	= 0
@@@@ -48,7 +49,7 @@@@ ifneq ($(BUILD),)
 CFLAGS	+= -DBUILD='".$(BUILD)"'
 endif
 
-all: CFLAGS	+= -flto -Ofast -D NDEBUG
+all: CFLAGS	+= -flto -D NDEBUG
 all: $(PROGRAM) $(OBJECTS)
 
 $(PROGRAM): $(OBJECTS)
@@@@ -57,15 +58,14 @@@@ ifneq ($(VERBOSE),0)
 	@@echo $(CC) $(LFLAGS) $(OBJECTS) -o $@@ $(LIBS)
 	@@echo
 endif
-	@@$(CC) $(LFLAGS) $(OBJECTS) -o $@@ $(LIBS)
-	@@ls --color $@@  
+	$(CC) $(LFLAGS) $(OBJECTS) -o $@@ $(LIBS)
 
 $(OBJECTS) : $(SOURCES)
 ifneq ($(VERBOSE),0)
 	@@echo 
 	@@echo $(CC) $(CFLAGS) -c $(SOURCES)
 endif
-	@@$(CC) $(CFLAGS) -c $(SOURCES)
+	$(CC) $(CFLAGS) -c $(SOURCES)
 
 release: clean
 release: all
@
