mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Checkpoint
This commit is contained in:
parent
1ad530270c
commit
0a54ffa32d
@ -12,7 +12,8 @@ $full_build = 1 ; # Whet
|
||||
$name = "trickified" ; # Name of the library
|
||||
$build_type = "o" ; # Type of library to be built (o, a , so)
|
||||
$debug = 0 ; # Debug info flag
|
||||
$work_dir = "./trickify/" ; # Directory to dump work artifacts
|
||||
#$work_dir = "./trickify/" ; # Directory to dump work artifacts
|
||||
$work_dir = "./" ; # Directory to dump work artifacts
|
||||
|
||||
$skip_arg = 0 ;
|
||||
foreach $argnum (0 .. $#ARGV)
|
||||
@ -82,7 +83,7 @@ foreach $argnum (0 .. $#ARGV)
|
||||
}
|
||||
elsif($arg eq "-w") # Set working directory
|
||||
{
|
||||
$work_dir = $ARGV[$argnum + 1] . "/trickify/" ;
|
||||
#$work_dir = $ARGV[$argnum + 1] . "/trickify/" ;
|
||||
$skip_arg = 1 ;
|
||||
}
|
||||
else
|
||||
@ -118,6 +119,7 @@ print(`$make_s_source`) ;
|
||||
|
||||
#Build source file list, only if trickifying the entire library
|
||||
#TODO: Move build artifacts into build? Maybe?
|
||||
print "Building trickify_src_list\n" ;
|
||||
if($full_build)
|
||||
{
|
||||
$make_src_list = "python3 $my_path../share/trick/makefiles/build_trickify_src_list.py" ;
|
||||
@ -144,6 +146,7 @@ print "Building object files\n" ;
|
||||
foreach $src (@src_files)
|
||||
{
|
||||
$file = $src ;
|
||||
#TODO double check this works on different boxes
|
||||
$file =~ s/$\Q.cpp\E// ;
|
||||
$file =~ s/$\Q.c\E// ;
|
||||
$cmd = "g++ -c $src -o $file.o" ;
|
||||
@ -155,6 +158,7 @@ foreach $src (@src_files)
|
||||
}
|
||||
|
||||
#Build object file list, only if trickifying the entire library
|
||||
print "Building trickify_obj_list\n" ;
|
||||
if($full_build)
|
||||
{
|
||||
$make_obj_list = "python3 $my_path../share/trick/makefiles/build_trickify_obj_list.py" ;
|
||||
@ -167,6 +171,7 @@ else
|
||||
}
|
||||
|
||||
#Build trickify call
|
||||
print "Begin Trickification...\n" ;
|
||||
$trickify_make_call = "make $trickify_make_args -f $trickify_make_path" ;
|
||||
print(`$trickify_make_call`) ;
|
||||
|
||||
@ -185,3 +190,4 @@ if($debug) {
|
||||
}
|
||||
|
||||
#TODO: Can't run trickify neutrally, must set source dir/output dir or conflicts will occur. Should fix or just document?
|
||||
#TODO: Can we change build dir path?
|
||||
|
@ -21,7 +21,8 @@ def build_S_source():
|
||||
for ext in def_header_ext:
|
||||
files = find_files_by_extension(loc, ext)
|
||||
for i in range(len(files)):
|
||||
s_source.write('#include "' + str(files[i]) + '"\n')
|
||||
#s_source.write('#include "' + work_dir + "/../" + str(files[i]) + '"\n')
|
||||
s_source.write('#include "' + work_dir + str(files[i]) + '"\n')
|
||||
|
||||
def build_obj_list():
|
||||
loc = ""
|
||||
@ -34,7 +35,8 @@ def build_obj_list():
|
||||
files = find_files_by_extension(loc, "o")
|
||||
s_source = open(work_dir + "trickify_obj_list", 'w')
|
||||
for i in range(len(files)):
|
||||
s_source.write(str(files[i]) + '\n')
|
||||
#s_source.write(work_dir + "/../" + str(files[i]) + '\n')
|
||||
s_source.write(work_dir + str(files[i]) + '\n')
|
||||
|
||||
def build_src_list():
|
||||
loc = ""
|
||||
@ -48,4 +50,5 @@ def build_src_list():
|
||||
files = find_files_by_extension(loc, ext)
|
||||
s_source = open(work_dir + "trickify_src_list", 'w')
|
||||
for i in range(len(files)):
|
||||
s_source.write(str(files[i]) + '\n')
|
||||
#s_source.write(work_dir + "/../" + str(files[i]) + '\n')
|
||||
s_source.write(work_dir + str(files[i]) + '\n')
|
||||
|
@ -105,10 +105,8 @@ TRICKIFY_PYTHON_DIR := $(abspath $(TRICKIFY_PYTHON_DIR))
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))Makefile.common
|
||||
|
||||
BUILD_DIR := $(dir $(MAKE_OUT))
|
||||
#PY_LINK_LIST := $(BUILD_DIR)trickify_py_link_list
|
||||
#IO_LINK_LIST := $(BUILD_DIR)trickify_io_link_list
|
||||
PY_LINK_LIST := $(MAKE_OUT)___trickify_py_link_list
|
||||
IO_LINK_LIST := $(BUILD_DIR)___trickify_io_link_list
|
||||
PY_LINK_LIST := $(BUILD_DIR)trickify_py_link_list
|
||||
IO_LINK_LIST := $(BUILD_DIR)trickify_io_link_list
|
||||
OBJ_LINK_LIST := trickify_obj_list
|
||||
LINK_LISTS := @$(IO_LINK_LIST) @$(PY_LINK_LIST) @$(OBJ_LINK_LIST)
|
||||
ifneq ($(wildcard $(BUILD_DIR)),)
|
||||
|
Loading…
Reference in New Issue
Block a user