mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.8 KiB

  1. . $confdir/functions.in
  2. uclibc_preparelocale() {
  3. find ./charmaps -name "*.pairs" > codesets.txt
  4. cp LOCALES locales.txt
  5. }
  6. uclibc_kernellinks() {
  7. ln -svf $root/include/linux include/linux
  8. ln -svf $root/include/asm include/asm
  9. ln -svf $root/include/scsi include/scsi
  10. }
  11. if [ $ROCKCFG_CROSSBUILD = 1 ]; then
  12. $(SED) "s,^CROSS=.*,CROSS=$bindir/${arch_target}-,g" Rules.mak
  13. fi
  14. # rulesets
  15. var_append conffiles ' ' $confdir/clean_arch.config
  16. var_append conffiles ' ' /tmp/$$.config
  17. # i'll use this file for the generated rules
  18. rm -f /tmp/$$.config
  19. {
  20. # TARGET_ARCH
  21. cpu="`echo "$arch_machine" | sed -e s/i.86/i386/ `"
  22. echo "X TARGET_$cpu"
  23. echo "X TARGET_ARCH \"$cpu\""
  24. if [ "$arch_bigendian" = "yes" ]; then
  25. echo "X ARCH_BIG_ENDIAN"
  26. else
  27. echo "X ARCH_LITTLE_ENDIAN"
  28. fi
  29. # CONFIG_
  30. if [ "$arch" == "x86" ]; then
  31. case "$ROCKCFG_X86_OPT" in
  32. generic) echo "X CONFIG_GENERIC_386" ;;
  33. i386) echo "X CONFIG_386" ;;
  34. i486) echo "X CONFIG_486" ;;
  35. pentium) echo "X CONFIG_586" ;;
  36. pentium-mmx) echo "X CONFIG_586MMX" ;;
  37. pentiumpro|pentium2)
  38. echo "X CONFIG_686" ;;
  39. pentium3) echo "X CONFIG_PENTIUMIII" ;;
  40. pentium4) echo "X CONFIG_PENTIUM4" ;;
  41. k6*) echo "X CONFIG_K6" ;;
  42. athlon*) echo "X CONFIG_K7" ;;
  43. via-c3*) echo "X CONFIG_CYRIXIII" ;;
  44. esac
  45. fi
  46. # PREFIX
  47. echo "X KERNEL_SOURCE \"$root/usr/src/linux\""
  48. echo "X RUNTIME_PREFIX \"/\""
  49. echo "X DEVEL_PREFIX \"/usr\""
  50. # locale
  51. if [ "$ROCKCFG_DISABLE_NLS" = "0" ]; then
  52. echo "X UCLIBC_HAS_LOCALE"
  53. fi
  54. # util-linux needs it to build some mounts
  55. # FIXME: this has to be done in the oposite way (disable those mounts
  56. # if libc doesn't have support)
  57. echo "X UCLIBC_HAS_RPC"
  58. # echo "X UCLIBC_HAS_FULL_RPC"
  59. # to get rint (iproute2)
  60. echo "X DO_C99_MATH"
  61. # to make sed happy
  62. echo "X ULIBC_HAS_WCHAR"
  63. } > /tmp/$$.config
  64. if [ "$ROCKCFG_DISABLE_NLS" = "0" ]; then
  65. hook_add preconf 5 '( cd extra/locale; uclibc_preparelocale )'
  66. var_append patchfiles ' ' $confdir/make_locale_after_headers.diff
  67. fi
  68. var_append makeopt ' ' "PREFIX=$root"
  69. var_append makeopt ' ' "RUNTIME_PREFIX=/ DEVEL_PREFIX=/usr/"
  70. runconf=0
  71. makeinstopt="$makeopt"
  72. if [ $stagelevel -eq 0 ]; then
  73. var_append patchfiles ' ' $confdir/dont_validate_kernelsource_on_stage0.diff
  74. # FIXME: i don't know why, but if i split this hook, the second disapears
  75. # i wanted the var append at premake-9
  76. hook_add premake 1 "auto_config 2; var_append makeopt ' ' headers"
  77. var_append makeinstopt ' ' install_dev
  78. else
  79. hook_add premake 1 'auto_config 2'
  80. var_append makeinstopt ' ' install
  81. # remove symlinks to avoid shares (install_dev)
  82. hook_add inmake 9 'rm -v include/{asm,linux,scsi}'
  83. # utils (ldd, ldconfig )
  84. hook_add postmake 5 'uclibc_kernellinks'
  85. hook_add postmake 6 'eval "$MAKE $makeopt utils install_utils"'
  86. fi
  87. var_append flist''del '|' "usr/include"