S_overrides

This commit is contained in:
plherrin 2025-03-19 15:52:19 -05:00
parent b6449db51c
commit 56b3be8f01
3 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
use Getopt::Long;
use Getopt::Long ;
use Cwd ;
use strict ;
my $my_path = $0 ;
@ -118,6 +119,15 @@ elsif ( $build_type eq "so" || $build_type eq "dylib" )
}
}
#Build the S_overrides_trickify.mk
if (!$no_clean_s_source)
{
print "Building S_overrides_trickify.mk\n" ;
my $my_cwd = getcwd ;
my $make_s_overrides = "python3 $my_path../share/trick/pymods/trick/build_S_overrides_trickify.py $ENV{'TRICKIFY_OBJECT_NAME'} $ENV{'TRICKIFY_HEADER'} $my_cwd/python" ;
print(`$make_s_overrides`) ;
}
#Build the S_source.hh
if (!$no_clean_s_source)
{

View File

@ -0,0 +1,7 @@
import os
import sys
path = os.path.dirname(os.path.abspath(__file__)) + "/build_trickify.py"
exec(open(path).read())
build_S_overrides_trickify(sys.argv[1], sys.argv[2], sys.argv[3])

View File

@ -52,3 +52,10 @@ def build_src_list():
files = find_files_by_extension(path, ext)
for i in range(len(files)):
src_list.write(str(files[i]) + '\n')
def build_S_overrides_trickify(ldflags, ext_lib_dirs, python_path):
s_overrides = open("S_overrides_trickify.mk", 'w')
s_overrides.write("TRICK_LDFLAGS += " + ldflags + '\n')
s_overrides.write("TRICK_EXT_LIB_DIRS += " + ext_lib_dirs + '\n')
s_overrides.write("TRICK_PYTHON_PATH += " + python_path + '\n')