clean and fix c_check makefile generation

This commit is contained in:
Owen Rafferty 2022-03-30 12:23:16 -05:00
parent 69aeff66fd
commit e0fcce528f
No known key found for this signature in database
GPG Key ID: A68B10E2554DEBCB
1 changed files with 21 additions and 19 deletions

40
c_check
View File

@ -331,25 +331,27 @@ done
# print $data, "\n"; # print $data, "\n";
printf "OSNAME=%s\n" "$os" >> "$makefile" {
printf "ARCH=%s\n" "$architecture" >> "$makefile" printf "OSNAME=%s\n" "$os"
printf "C_COMPILER=%s\n" "$compiler" >> "$makefile" printf "ARCH=%s\n" "$architecture"
[ "$binformat" = "bin32" ] && printf "BINARY32=\n" >> "$makefile" printf "C_COMPILER=%s\n" "$compiler"
[ "$binformat" = "bin64" ] && printf "BINARY64=\n" >> "$makefile" [ "$binformat" != "bin32" ] && printf "BINARY32=\n"
[ "$binformat" = "bin32" ] && printf "BINARY32=1\n" >> "$makefile" [ "$binformat" != "bin64" ] && printf "BINARY64=\n"
[ "$binformat" = "bin64" ] && printf "BINARY64=1\n" >> "$makefile" [ "$binformat" = "bin32" ] && printf "BINARY32=1\n"
[ -n "$need_fu" ] && printf 'FU=%s\n' "$need_fu" >> "$makefile" [ "$binformat" = "bin64" ] && printf "BINARY64=1\n"
[ "$cross" -ne 0 ] && [ -n "$cross_suffix" ] && \ [ -n "$need_fu" ] && printf 'FU=%s\n' "$need_fu"
printf "CROSS_SUFFIX=%s\n" "$cross_suffix" >> "$makefile" [ "$cross" -ne 0 ] && [ -n "$cross_suffix" ] && \
[ "$cross" -ne 0 ] && printf "CROSS=1\n" >> "$makefile" printf "CROSS_SUFFIX=%s\n" "$cross_suffix"
printf "CEXTRALIB=%s %s %s\n" "$linker_L" "$linker_l" "$linker_a" >> "$makefile" [ "$cross" -ne 0 ] && printf "CROSS=1\n"
[ "$have_msa" -eq 1 ] && { printf "CEXTRALIB=%s %s %s\n" "$linker_L" "$linker_l" "$linker_a"
printf "HAVE_MSA=1\n" >> "$makefile" [ "$have_msa" -eq 1 ] && {
printf "MSA_FLAGS=%s\n" "$msa_flags" >> "$makefile" printf "HAVE_MSA=1\n"
} printf "MSA_FLAGS=%s\n" "$msa_flags"
! [ "$no_avx512" -eq 1 ] || printf "NO_AVX512=1\n" >> "$makefile" }
! [ "$no_avx2" -eq 1 ] || printf "NO_AVX2=1\n" >> "$makefile" ! [ "$no_avx512" -eq 1 ] || printf "NO_AVX512=1\n"
! [ "$oldgcc" -eq 1 ] || printf "OLDGCC=1\n" >> "$makefile" ! [ "$no_avx2" -eq 1 ] || printf "NO_AVX2=1\n"
! [ "$oldgcc" -eq 1 ] || printf "OLDGCC=1\n"
} >> "$makefile"
os="$(echo "$os" | tr '[:lower:]' '[:upper:]'/ )" os="$(echo "$os" | tr '[:lower:]' '[:upper:]'/ )"
architecture="$(echo "$architecture" | tr '[:lower:]' '[:upper:]' )" architecture="$(echo "$architecture" | tr '[:lower:]' '[:upper:]' )"