From 7a20dce6fca74f27c537264dfea95fdeccb63e9c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 1 Apr 2021 15:03:32 +0100 Subject: [PATCH] compile all libraries, use --std=08 it passes --- ls180/vhd2obj.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ls180/vhd2obj.py b/ls180/vhd2obj.py index 80c17a7..596519e 100644 --- a/ls180/vhd2obj.py +++ b/ls180/vhd2obj.py @@ -1,25 +1,28 @@ #!/usr/bin/env python3 -"""builds nsxlib VHD files into object files using ghdl +"""builds nsxlib and other VHD files into object files using ghdl """ import os import sys -NSXLIB = "nsxlib" +SRC = [('nsxlib', 'vhd'), + ('niolib', 'vhd'), + ('vst_src', 'vst')] # make and change to obj dir os.system("mkdir -p obj") cwd = os.getcwd() os.chdir("obj") -# run ghdl -a on every nsxlib vhd file -for fname in os.listdir("../%s" % NSXLIB): - if not fname.endswith(".vhd"): - continue - print (fname) - prefix = fname[:-4] # strip ".vhd" - os.system("ghdl -a ../%s/%s" % (NSXLIB, fname)) +for srcdir, suffix in SRC: + # run ghdl -a on every vhd / vst file + for fname in os.listdir("../%s" % srcdir): + if not fname.endswith(".%s" % suffix): + continue + print (fname) + prefix = fname[:-4] # strip ".vhd" + os.system("ghdl -a -g --std=08 ../%s/%s" % (srcdir, fname)) # back to original dir os.chdir(cwd) -- 2.30.2