Fixed build of supplied memory model or auxiliary files if no headers

This commit is contained in:
Simon Southwell 2026-02-12 15:05:50 +00:00
commit ae80e5b5cb
2 changed files with 11 additions and 9 deletions

View file

@ -35,7 +35,7 @@
#include <pthread.h>
#include <semaphore.h>
#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

View file

@ -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)