From ae80e5b5cb43d4e9f82f9d45aa3b614e053f9df4 Mon Sep 17 00:00:00 2001 From: Simon Southwell Date: Thu, 12 Feb 2026 15:05:50 +0000 Subject: [PATCH] Fixed build of supplied memory model or auxiliary files if no headers --- code/VProc.h | 2 +- test/makefile.common | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/code/VProc.h b/code/VProc.h index ec2c3fd..114863a 100644 --- a/code/VProc.h +++ b/code/VProc.h @@ -35,7 +35,7 @@ #include #include -#define VERSION_STRING "VProc version 1.13.5. Copyright (c) 2004-2026 Simon Southwell." +#define VERSION_STRING "VProc version 1.13.6. Copyright (c) 2004-2026 Simon Southwell." #ifndef VP_MAX_NODES #define VP_MAX_NODES 64 diff --git a/test/makefile.common b/test/makefile.common index d71917c..79866dc 100644 --- a/test/makefile.common +++ b/test/makefile.common @@ -26,10 +26,10 @@ # SRCDIR : Location of VProc source files # USRCDIR : Location of user C/C++ source files # MEMMODELDIR : Location of optional memory model source files (set to . if unused) -# AUXDIR : Location of optional auxilary user source files (set to . if unused) +# AUXDIR : Location of optional auxiliary user source files (set to . if unused) # USER_C : List of user C/C++ source files (no path) # MEM_C : Optional list of memory model C/C++ source files (no path) -# AUX_C : Optional list of auxilary user C/C++ source files (no path) +# AUX_C : Optional list of auxiliary user C/C++ source files (no path) # VOBJDIR : Location of temporary directory for object files # OSTYPE : OS type. "Linux" for Linux else defaults to MSYS2/mingw64 on windows # SIMINCLUDEFLAG : Include flag (-I) for logic simulator's include path @@ -54,8 +54,10 @@ USER_CPP_BASE = $(notdir $(filter %cpp, $(USER_C))) USER_C_BASE = $(notdir $(filter %c, $(USER_C))) MEM_CPP_BASE = $(notdir $(filter %cpp, $(MEM_C))) MEM_C_BASE = $(notdir $(filter %c, $(MEM_C))) +MEM_H_FILES = $(wildcard $(MEMMODELDIR)/*.h) AUX_CPP_BASE = $(notdir $(filter %cpp, $(AUX_C))) AUX_C_BASE = $(notdir $(filter %c, $(AUX_C))) +AUX_H_FILES = $(wildcard $(AUXDIR)/*.h) # Create list of object files (excluding any veriuser object) VOBJS = $(addprefix $(VOBJDIR)/, \ @@ -118,20 +120,20 @@ $(VOBJDIR)/%.o: $(USRCDIR)/%.cpp @$(C++) -c -fPIC $(CPPSTD) -Wno-write-strings $(CFLAGS) $< -o $@ # Rule to build (any) memory model C sources -$(VOBJDIR)/%.o: $(MEMMODELDIR)/%.c $(MEMMODELDIR)/*.h +$(VOBJDIR)/%.o: $(MEMMODELDIR)/%.c $(MEM_H_FILES) @$(CC) -c -fPIC $(CFLAGS) $< -o $@ # Rule to build (any) memory model C++ sources -$(VOBJDIR)/%.o: $(MEMMODELDIR)/%.cpp $(MEMMODELDIR)/*.h +$(VOBJDIR)/%.o: $(MEMMODELDIR)/%.cpp $(MEM_H_FILES) @$(C++) -c -fPIC $(CFLAGS) $< -o $@ -# Rule to build (any) auxilary C sources -$(VOBJDIR)/%.o: $(AUXDIR)/%.c $(AUXDIR)/*.h +# Rule to build (any) auxiliary C sources +$(VOBJDIR)/%.o: $(AUXDIR)/%.c $(AUX_H_FILES) @$(CC) -c -fPIC $(CFLAGS) $< -o $@ # Rule to build (any) memory model C++ sources -$(VOBJDIR)/%.o: $(AUXDIR)/%.cpp $(AUXDIR)/*.h - @$(C++) -c -fPIC $(CFLAGS) $< -o $@ +$(VOBJDIR)/%.o: $(AUXDIR)/%.cpp $(AUX_H_FILES) + @$(C++) -c -fPIC $(CPPSTD) -Wno-write-strings $(CFLAGS) $< -o $@ # Rule to build VProc library $(VLIB) : $(VOBJS) $(VOBJDIR)