4 # TBD: those info should be defined in platform/toolchain/*.imi file as general info.
7 if [[ -z $OS || $OS == linux ]]; then
9 elif [[ $OS == win32 || $OS == cygwin || TOOLCHAIN == vc ]]; then
15 if [[ -z $OS || $OS == cygwin || $VENDOR =~ GNU || TOOLCHAIN == gcc ]]; then
17 elif [[ $OS == win32 || TOOLCHAIN == vc ]]; then
19 elif [[ TOOLCHAIN == iar || TOOLCHAIN == mdk ]]; then
20 BUILD_TOOLCHAIN=$TOOLCHAIN
26 declare -A -g EXT_NAME[null]=""
29 # operating system relative
31 if [[ $BUILD_SYSTEM == win32 ]]; then
37 declare -A -g EXT_NAME[drv]=".ko"
38 declare -A -g EXT_NAME[exe]=""
39 declare -A -g EXT_NAME[dll]=".so"
40 declare -A -g EXT_NAME[lib]=".a"
41 declare -A -g EXT_NAME[exelist]=""
42 elif [[ $BUILD_SYSTEM == linux ]]; then
48 declare -A -g EXT_NAME[drv]=".sys"
49 declare -A -g EXT_NAME[exe]=".exe"
50 declare -A -g EXT_NAME[dll]=".dll"
51 declare -A -g EXT_NAME[lib]=".lib"
52 declare -A -g EXT_NAME[exelist]=".exe"
54 echo "invalid OS type($BUILD_SYSTEM) info."
59 # arch/toolchain relative
61 if [[ $BUILD_TOOLCHAIN == gcc ]]; then
62 declare -A -g EXT_NAME[objlist]=".o"
63 declare -A -g EXT_NAME[asm]=".S"
64 declare -A -g EXT_NAME[obj]=".o"
66 declare -A -g EXT_NAME[sh]=".sh"
67 declare -A -g EXT_NAME[c]=".c"
68 declare -A -g EXT_NAME[cxx]=".cc"
69 declare -A -g EXT_NAME[cpp]=".cpp"
70 declare -A -g EXT_NAME[dephdr]=".dephdr"
71 declare -A -g EXT_NAME[cgraph]=".callgraph"
72 elif [[ $BUILD_TOOLCHAIN == vc ]]; then
73 declare -A -g EXT_NAME[objlist]=".obj"
74 declare -A -g EXT_NAME[asm]=".asm"
75 declare -A -g EXT_NAME[obj]=".obj"
77 declare -A -g EXT_NAME[sh]=".sh"
78 declare -A -g EXT_NAME[c]=".c"
79 declare -A -g EXT_NAME[cxx]=".cc"
80 declare -A -g EXT_NAME[cpp]=".cpp"
81 declare -A -g EXT_NAME[dephdr]=".dephdr"
82 declare -A -g EXT_NAME[cgraph]=".callgraph"
83 elif [[ $BUILD_TOOLCHAIN == iar || $BUILD_TOOLCHAIN == mdk ]]; then
84 declare -A -g EXT_NAME[objlist]=".obj"
85 declare -A -g EXT_NAME[asm]=".asm"
86 declare -A -g EXT_NAME[obj]=".obj"
88 declare -A -g EXT_NAME[sh]=".sh"
89 declare -A -g EXT_NAME[c]=".c"
90 declare -A -g EXT_NAME[cxx]=".cc"
91 declare -A -g EXT_NAME[cpp]=".cpp"
92 declare -A -g EXT_NAME[dephdr]=".dephdr"
93 declare -A -g EXT_NAME[cgraph]=".callgraph"
95 echo "invalid toolchain($TOOLCHAIN) info."
99 declare -A -g EXT_NAME[info]=".texi"
100 declare -A -g EXT_NAME[md]=".md"
101 declare -A -g EXT_NAME[docbook]=".docbook"
102 declare -A -g EXT_NAME[man1]=".1"
103 declare -A -g EXT_NAME[man2]=".2"
104 declare -A -g EXT_NAME[man3]=".3"
105 declare -A -g EXT_NAME[man4]=".4"
106 declare -A -g EXT_NAME[man5]=".5"
107 declare -A -g EXT_NAME[man6]=".6"
108 declare -A -g EXT_NAME[man7]=".7"
109 declare -A -g EXT_NAME[info]=".info"
110 declare -A -g EXT_NAME[dvi]=".dvi"
111 declare -A -g EXT_NAME[ps]=".ps"
112 declare -A -g EXT_NAME[txt]=".txt"
113 declare -A -g EXT_NAME[html]=".html"
114 declare -A -g EXT_NAME[chm]=".chm"
115 declare -A -g EXT_NAME[pdf]=".pdf"
129 LANG_EXT_NAME[sh]="sh"
130 if [[ ${COMPILER_TYPE,,} == gcc ]]; then
131 LANG_EXT_NAME[cxx]="cc"
132 LANG_EXT_NAME[cpp]="cpp"
133 LANG_EXT_NAME[c++]="cpp"
134 LANG_EXT_NAME[asm]="S"
135 elif [[ ${SYSTEM_TYPE,,} == mac ]]; then
136 LANG_EXT_NAME[cxx]="cc"
137 LANG_EXT_NAME[cpp]="cpp"
138 LANG_EXT_NAME[c++]="cpp"
139 LANG_EXT_NAME[asm]="asm"