Working on removing accidentally committed binaries.

This commit is contained in:
Scott Duensing 2026-03-27 19:08:12 -05:00
parent 65d7a252ca
commit 0043e06c82
5 changed files with 40 additions and 9 deletions

View file

@ -34,10 +34,39 @@ FORMRT_OBJS = $(OBJDIR)/formrt.o
APP_OBJS = $(OBJDIR)/ideMain.o $(FORMRT_OBJS) APP_OBJS = $(OBJDIR)/ideMain.o $(FORMRT_OBJS)
APP_TARGET = $(APPDIR)/dvxbasic.app APP_TARGET = $(APPDIR)/dvxbasic.app
.PHONY: all clean # Native test programs (host gcc, not cross-compiled)
HOSTCC = gcc
HOSTCFLAGS = -O2 -Wall -Wextra -I.
BINDIR = ../bin
TEST_COMPILER = $(BINDIR)/test_compiler
TEST_VM = $(BINDIR)/test_vm
TEST_LEX = $(BINDIR)/test_lex
TEST_QUICK = $(BINDIR)/test_quick
TEST_COMPILER_SRCS = test_compiler.c compiler/lexer.c compiler/parser.c compiler/codegen.c compiler/symtab.c runtime/vm.c runtime/values.c
TEST_VM_SRCS = test_vm.c runtime/vm.c runtime/values.c
TEST_LEX_SRCS = test_lex.c compiler/lexer.c
TEST_QUICK_SRCS = test_quick.c compiler/lexer.c compiler/parser.c compiler/codegen.c compiler/symtab.c runtime/vm.c runtime/values.c
.PHONY: all clean tests
all: $(RT_TARGET) $(LIBSDIR)/basrt.dep $(APP_TARGET) install-samples all: $(RT_TARGET) $(LIBSDIR)/basrt.dep $(APP_TARGET) install-samples
tests: $(TEST_COMPILER) $(TEST_VM) $(TEST_LEX) $(TEST_QUICK)
$(TEST_COMPILER): $(TEST_COMPILER_SRCS) | $(BINDIR)
$(HOSTCC) $(HOSTCFLAGS) -o $@ $(TEST_COMPILER_SRCS) -lm
$(TEST_VM): $(TEST_VM_SRCS) | $(BINDIR)
$(HOSTCC) $(HOSTCFLAGS) -o $@ $(TEST_VM_SRCS) -lm
$(TEST_LEX): $(TEST_LEX_SRCS) | $(BINDIR)
$(HOSTCC) $(HOSTCFLAGS) -w -o $@ $(TEST_LEX_SRCS) -lm
$(TEST_QUICK): $(TEST_QUICK_SRCS) | $(BINDIR)
$(HOSTCC) $(HOSTCFLAGS) -o $@ $(TEST_QUICK_SRCS) -lm
# Runtime library DXE (exports symbols via dlregsym constructor) # Runtime library DXE (exports symbols via dlregsym constructor)
$(RT_TARGET): $(RT_OBJS) | $(LIBSDIR) $(RT_TARGET): $(RT_OBJS) | $(LIBSDIR)
$(DXE3GEN) -o $(LIBSDIR)/basrt.dxe \ $(DXE3GEN) -o $(LIBSDIR)/basrt.dxe \
@ -91,5 +120,9 @@ $(LIBSDIR):
$(APPDIR): $(APPDIR):
mkdir -p $(APPDIR) mkdir -p $(APPDIR)
$(BINDIR):
mkdir -p $(BINDIR)
clean: clean:
rm -f $(RT_OBJS) $(COMP_OBJS) $(FORMRT_OBJS) $(APP_OBJS) $(RT_TARGET) $(APP_TARGET) $(LIBSDIR)/basrt.dep $(OBJDIR)/basrt_init.o rm -f $(RT_OBJS) $(COMP_OBJS) $(FORMRT_OBJS) $(APP_OBJS) $(RT_TARGET) $(APP_TARGET) $(LIBSDIR)/basrt.dep $(OBJDIR)/basrt_init.o
rm -f $(TEST_COMPILER) $(TEST_VM) $(TEST_LEX) $(TEST_QUICK)

View file

@ -1,9 +1,6 @@
// test_compiler.c -- End-to-end test: source -> compiler -> VM -> output // test_compiler.c -- End-to-end test: source -> compiler -> VM -> output
// //
// Build (native): // Build: make -C dvxbasic tests
// gcc -O2 -Wall -o test_compiler test_compiler.c \
// compiler/lexer.c compiler/parser.c compiler/codegen.c compiler/symtab.c \
// runtime/vm.c runtime/values.c -lm
#include "compiler/parser.h" #include "compiler/parser.h"
#include "runtime/vm.h" #include "runtime/vm.h"

View file

@ -1,5 +1,6 @@
// test_lex.c -- Dump lexer tokens // test_lex.c -- Dump lexer tokens
// gcc -O2 -w -o test_lex test_lex.c compiler/lexer.c -lm //
// Build: make -C dvxbasic tests
#include "compiler/lexer.h" #include "compiler/lexer.h"
#include <stdio.h> #include <stdio.h>

View file

@ -1,5 +1,6 @@
// test_quick.c -- Quick single-program test // test_quick.c -- Quick single-program test
// gcc -O2 -Wall -o test_quick test_quick.c compiler/lexer.c compiler/parser.c compiler/codegen.c compiler/symtab.c runtime/vm.c runtime/values.c -lm //
// Build: make -C dvxbasic tests
#include "compiler/parser.h" #include "compiler/parser.h"
#include "runtime/vm.h" #include "runtime/vm.h"

View file

@ -3,8 +3,7 @@
// Hand-assembles a small p-code program and executes it. // Hand-assembles a small p-code program and executes it.
// Tests: PRINT "Hello, World!", arithmetic, FOR loop, string ops. // Tests: PRINT "Hello, World!", arithmetic, FOR loop, string ops.
// //
// Build (native, not cross-compiled): // Build: make -C dvxbasic tests
// gcc -O2 -Wall -o test_vm test_vm.c runtime/vm.c runtime/values.c -lm
#include "compiler/opcodes.h" #include "compiler/opcodes.h"
#include "runtime/vm.h" #include "runtime/vm.h"