Added additional option "sort" to supply a sorting script to specify
the order of files when compiled into a library;  this allows the
Makefile to enforce natural sort order and/or put dependent entries
at the top.  Also added a custom script for sky130 to handle the
assortment of "include" statements in the standard cell verilog
before generating the library files.
diff --git a/common/create_gds_library.py b/common/create_gds_library.py
index 34424fb..b02535f 100755
--- a/common/create_gds_library.py
+++ b/common/create_gds_library.py
@@ -45,9 +45,18 @@
     if os.path.isfile(alllibname):
         os.remove(alllibname)
 
-    glist = glob.glob(destlibdir + '/*.gds')
-    glist.extend(glob.glob(destlibdir + '/*.gdsii'))
-    glist.extend(glob.glob(destlibdir + '/*.gds2'))
+    # If file "filelist.txt" exists in the directory, get the list of files from it
+    if os.path.exists(destlibdir + '/filelist.txt'):
+        with open(destlibdir + '/filelist.txt', 'r') as ifile:
+            rlist = ifile.read().splitlines()
+            glist = []
+            for rfile in rlist:
+                glist.append(destlibdir + '/' + rfile)
+    else:
+        glist = glob.glob(destlibdir + '/*.gds')
+        glist.extend(glob.glob(destlibdir + '/*.gdsii'))
+        glist.extend(glob.glob(destlibdir + '/*.gds2'))
+
     if alllibname in glist:
         glist.remove(alllibname)