Linker generation script for most of the supported chips
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
beeb9c3f65
commit
c2f7128459
28
scripts/genlink.awk
Normal file
28
scripts/genlink.awk
Normal file
@@ -0,0 +1,28 @@
|
||||
# This program converts chip name to the series of definitions for make of
|
||||
# automatic linker script.
|
||||
#
|
||||
# Copyright (C) 2013 Frantisek Burian <Bufran@seznam.cz>
|
||||
# Copyright (C) 2013 Werner Almesberger <wpwrak>
|
||||
#
|
||||
|
||||
BEGIN {
|
||||
PAT = tolower(PAT);
|
||||
}
|
||||
!/^#/{
|
||||
tmp = "^"$1"$";
|
||||
gsub(/?/, ".", tmp);
|
||||
gsub(/*/, ".*", tmp);
|
||||
gsub(/+/, ".+", tmp);
|
||||
tolower(tmp);
|
||||
|
||||
if (PAT ~ tmp) {
|
||||
if ($2 != "+")
|
||||
PAT=$2;
|
||||
$1="";
|
||||
$2="";
|
||||
for (i = 3; i <= NF; i = i + 1)
|
||||
$i = "-D"$i;
|
||||
print;
|
||||
if (PAT=="END") exit;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user