mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-24 14:39:47 +00:00
Updates file_setup.sh script to split based on the asm files being in different sub directories
This commit is contained in:
parent
fcdfa28d66
commit
8468e83786
1
Makefile
1
Makefile
@ -167,7 +167,6 @@ $(S_FILES): disasm
|
||||
disasm: tables/files.txt tables/functions.txt tables/objects.txt tables/variables.txt tables/vrom_variables.txt tables/pre_boot_variables.txt tables/files_with_nonmatching.txt
|
||||
./tools/disasm.py -d ./asm -u . -l ./tables/files.txt -f ./tables/functions.txt -o ./tables/objects.txt -v ./tables/variables.txt -v ./tables/vrom_variables.txt -v ./tables/pre_boot_variables.txt
|
||||
@while read -r file; do \
|
||||
#echo "$$file" \
|
||||
./tools/split_asm.py ./asm/$$file.asm ./asm/non_matchings/$$file; \
|
||||
done < ./tables/files_with_nonmatching.txt
|
||||
|
||||
|
@ -7,18 +7,23 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
code_file=$1
|
||||
code_path=$2
|
||||
|
||||
# If there are only two arguments, then we will use the non_matchings path to be the same as src_path
|
||||
if [ "$#" -eq "2" ];
|
||||
then
|
||||
3=$2
|
||||
code_bucket=$code_path
|
||||
else
|
||||
code_bucket=$3
|
||||
fi
|
||||
|
||||
# Split asm file, create base c file, and add it to the list of non-matchings
|
||||
tools/split_asm.py -c "src/$2/$1.c" "asm/$1.asm" "asm/non_matchings/$3/$1"
|
||||
echo "$1" >> tables/files_with_nonmatching.txt
|
||||
tools/split_asm.py -c "./src/$code_path/$code_file.c" "./asm/$code_bucket/$code_file.asm" "./asm/non_matchings/$code_bucket/$code_file"
|
||||
echo "$code_bucket/$code_file" >> tables/files_with_nonmatching.txt
|
||||
|
||||
# Edit linker script to use new .c file
|
||||
sed -i "s/asm\/$1.o/src\/${2//\//\\\/}\/$1.o/g" linker_scripts/code_script.txt
|
||||
sed -i "s/asm\/$code_file.o/src\/${2//\//\\\/}\/$code_file.o/g" linker_scripts/code_script.txt
|
||||
|
||||
# Build with new file
|
||||
make diff-init
|
||||
make -j diff-init
|
||||
|
Loading…
Reference in New Issue
Block a user