Makefile 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. _IN_CVTC= 1
  4. include $(ADK_TOPDIR)/rules.mk
  5. include ../rules.mk
  6. include Makefile.inc
  7. include ${ADK_TOPDIR}/mk/buildhlp.mk
  8. # disable LTO
  9. TARGET_CFLAGS:=$(filter-out -flto,$(TARGET_CFLAGS))
  10. # handled by uClibc-ng makefiles
  11. TARGET_CFLAGS:=$(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
  12. TARGET_LDFLAGS:=$(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
  13. ifeq ($(ADK_TARGET_HARD_FLOAT),y)
  14. ifeq ($(ADK_TARGET_ARCH_ARM),y)
  15. TARGET_CFLAGS+= -Wa,-mfloat-abi=hard
  16. endif
  17. ifeq ($(ADK_TARGET_ARCH_MIPS),y)
  18. TARGET_CFLAGS+= -Wa,-mhard-float
  19. endif
  20. endif
  21. ifeq ($(ADK_TARGET_SOFT_FLOAT),y)
  22. ifeq ($(ADK_TARGET_ARCH_ARM),y)
  23. TARGET_CFLAGS+= -Wa,-mfloat-abi=soft
  24. endif
  25. ifeq ($(ADK_TARGET_ARCH_MIPS),y)
  26. TARGET_CFLAGS+= -Wa,-msoft-float
  27. endif
  28. endif
  29. ifeq (${ADK_MAKE_PARALLEL},y)
  30. UCLIBC_MAKEOPTS+= -j${ADK_MAKE_JOBS}
  31. endif
  32. $(WRKBUILD)/.configured: $(WRKBUILD)/.prepared
  33. $(SED) 's,^CROSS_COMPILE=.*,CROSS_COMPILE=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
  34. ifeq ($(ADK_TARGET_LIB_UCLIBC_NG_GIT),y)
  35. PATH='$(HOST_PATH)' sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
  36. $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc-ng.config >${WRKBUILD}/.config
  37. else
  38. PATH='$(HOST_PATH)' sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
  39. $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc.config >${WRKBUILD}/.config
  40. endif
  41. ifeq ($(ADK_TARGET_ENDIAN),little)
  42. $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
  43. $(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
  44. $(SED) 's/.*\(ARCH_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
  45. $(SED) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
  46. else
  47. $(SED) 's/.*\(ARCH_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
  48. $(SED) 's/.*\(ARCH_WANTS_BIG_ENDIAN\).*/\1=y/' ${WRKBUILD}/.config
  49. $(SED) 's/.*\(ARCH_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
  50. $(SED) 's/.*\(ARCH_WANTS_LITTLE_ENDIAN\).*/# \1 is not set/' ${WRKBUILD}/.config
  51. endif
  52. ifeq ($(ADK_TARGET_SOFT_FLOAT),y)
  53. $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
  54. $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/#\1=y/' ${WRKBUILD}/.config
  55. endif
  56. ifeq ($(ADK_TARGET_HARD_FLOAT),y)
  57. $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/\1=y/' ${WRKBUILD}/.config
  58. $(SED) 's/.*\(UCLIBC_HAS_SOFT_FLOAT\).*/# \1 is not set/' ${WRKBUILD}/.config
  59. endif
  60. ifeq ($(ADK_TARGET_BINFMT_FDPIC),y)
  61. $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/\1=y/' ${WRKBUILD}/.config
  62. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
  63. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
  64. $(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
  65. endif
  66. ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
  67. ifeq ($(ADK_TARGET_BINFMT_FLAT_ONE),y)
  68. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT\).*/\1=y/' ${WRKBUILD}/.config
  69. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
  70. $(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
  71. $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
  72. endif
  73. ifeq ($(ADK_TARGET_BINFMT_FLAT_SEP_DATA),y)
  74. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/\1=y/' ${WRKBUILD}/.config
  75. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/' ${WRKBUILD}/.config
  76. $(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/# \1 is not set/' ${WRKBUILD}/.config
  77. $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
  78. endif
  79. ifeq ($(ADK_TARGET_BINFMT_FLAT_SHARED),y)
  80. $(SED) 's/.*\(UCLIBC_FORMAT_SHARED_FLAT\).*/\1=y/' ${WRKBUILD}/.config
  81. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT \).*/# \1 is not set/' ${WRKBUILD}/.config
  82. $(SED) 's/.*\(UCLIBC_FORMAT_FLAT_SEP_DATA\).*/# \1 is not set/' ${WRKBUILD}/.config
  83. $(SED) 's/.*\(UCLIBC_FORMAT_FDPIC_ELF\).*/# \1 is not set/' ${WRKBUILD}/.config
  84. endif
  85. endif
  86. ifeq ($(ADK_TARGET_LIBC_ICONV),y)
  87. $(SED) 's/.*\(UCLIBC_HAS_LOCALE\).*/\1=y/' ${WRKBUILD}/.config
  88. endif
  89. ifeq ($(ADK_TARGET_UCLINUX),y)
  90. $(SED) 's/.*\(ARCH_USE_MMU\).*/# \1 is not set/' ${WRKBUILD}/.config
  91. endif
  92. ifeq ($(ADK_TARGET_LIB_UCLIBC_NG_GIT),y)
  93. ifeq ($(ADK_TARGET_WITH_NPTL),y)
  94. $(SED) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/\1=y/' ${WRKBUILD}/.config
  95. $(SED) 's/.*\(UCLIBC_HAS_TLS\).*/\1=y/' ${WRKBUILD}/.config
  96. $(SED) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/' ${WRKBUILD}/.config
  97. $(SED) 's/.*\(UCLIBC_HAS_LINUXTHREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
  98. $(SED) 's/.*\(HAS_NO_THREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
  99. endif
  100. ifeq ($(ADK_TARGET_WITH_LT),y)
  101. $(SED) 's/.*\(UCLIBC_HAS_LINUXTHREADS\).*/\1=y/' ${WRKBUILD}/.config
  102. $(SED) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/# \1 is not set/' ${WRKBUILD}/.config
  103. $(SED) 's/.*\(UCLIBC_HAS_TLS\).*/# \1 is not set/' ${WRKBUILD}/.config
  104. $(SED) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/' ${WRKBUILD}/.config
  105. $(SED) 's/.*\(HAS_NO_THREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
  106. endif
  107. ifeq ($(ADK_TARGET_LIB_WITHOUT_THREADS)$(ADK_TARGET_WITHOUT_THREADS),y)
  108. $(SED) 's/.*\(UCLIBC_HAS_LINUXTHREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
  109. $(SED) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/# \1 is not set/' ${WRKBUILD}/.config
  110. $(SED) 's/.*\(UCLIBC_HAS_TLS\).*/# \1 is not set/' ${WRKBUILD}/.config
  111. $(SED) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
  112. $(SED) 's/.*\(HAS_NO_THREADS\).*/\1=y/' ${WRKBUILD}/.config
  113. endif
  114. endif
  115. ifeq ($(ADK_TARGET_LIB_UCLIBC_NG_1_0),y)
  116. ifeq ($(ADK_TARGET_WITH_NPTL),y)
  117. $(SED) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/\1=y/' ${WRKBUILD}/.config
  118. $(SED) 's/.*\(UCLIBC_HAS_TLS\).*/\1=y/' ${WRKBUILD}/.config
  119. $(SED) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/\1=y/' ${WRKBUILD}/.config
  120. $(SED) 's/.*\(LINUXTHREADS_OLD\).*/# \1 is not set/' ${WRKBUILD}/.config
  121. $(SED) 's/.*\(LINUXTHREADS_NEW\).*/# \1 is not set/' ${WRKBUILD}/.config
  122. $(SED) 's/.*\(HAS_NO_THREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
  123. endif
  124. ifeq ($(ADK_TARGET_WITH_LT),y)
  125. $(SED) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/# \1 is not set/' ${WRKBUILD}/.config
  126. $(SED) 's/.*\(UCLIBC_HAS_TLS\).*/# \1 is not set/' ${WRKBUILD}/.config
  127. $(SED) 's/.*\(LINUXTHREADS_OLD\).*/\1=y/' ${WRKBUILD}/.config
  128. $(SED) 's/.*\(LINUXTHREADS_NEW\).*/# \1 is not set/' ${WRKBUILD}/.config
  129. $(SED) 's/.*\(HAS_NO_THREADS\).*/# \1 is not set/' ${WRKBUILD}/.config
  130. endif
  131. ifeq ($(ADK_TARGET_LIB_WITHOUT_THREADS)$(ADK_TARGET_WITHOUT_THREADS),y)
  132. $(SED) 's/.*\(LINUXTHREADS_OLD\).*/# \1 is not set/' ${WRKBUILD}/.config
  133. $(SED) 's/.*\(LINUXTHREADS_NEW\).*/# \1 is not set/' ${WRKBUILD}/.config
  134. $(SED) 's/.*\(UCLIBC_HAS_THREADS_NATIVE\).*/# \1 is not set/' ${WRKBUILD}/.config
  135. $(SED) 's/.*\(UCLIBC_HAS_TLS\).*/# \1 is not set/' ${WRKBUILD}/.config
  136. $(SED) 's/.*\(PTHREADS_DEBUG_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
  137. $(SED) 's/.*\(HAS_NO_THREADS\).*/\1=y/' ${WRKBUILD}/.config
  138. endif
  139. endif
  140. ifeq ($(ADK_TARGET_USE_STATIC_LIBS)$(ADK_TARGET_BINFMT_FLAT),)
  141. $(SED) 's/.*\(HAVE_SHARED\).*/\1=y/' ${WRKBUILD}/.config
  142. else
  143. $(SED) 's/.*\(HAVE_SHARED\).*/# \1 is not set/' ${WRKBUILD}/.config
  144. endif
  145. ifeq ($(ADK_TARGET_USE_GNU_HASHSTYLE),y)
  146. $(SED) 's/.*\(LDSO_GNU_HASH_SUPPORT\).*/\1=y/' ${WRKBUILD}/.config
  147. else
  148. $(SED) 's/.*\(LDSO_GNU_HASH_SUPPORT\).*/# \1 is not set/' ${WRKBUILD}/.config
  149. endif
  150. ifeq ($(ADK_TARGET_USE_SSP),y)
  151. $(SED) 's,.*UCLIBC_HAS_SSP,UCLIBC_HAS_SSP=y,' ${WRKBUILD}/.config
  152. echo "UCLIBC_HAS_SSP_COMPAT=n" >> ${WRKBUILD}/.config
  153. echo "SSP_QUICK_CANARY=n" >> ${WRKBUILD}/.config
  154. echo "UCLIBC_BUILD_SSP=y" >> ${WRKBUILD}/.config
  155. endif
  156. ifeq ($(ADK_DEBUG),y)
  157. $(SED) 's/.*\(DODEBUG\).*/\1=y/' ${WRKBUILD}/.config
  158. endif
  159. #
  160. # architecture specific options
  161. #
  162. # arc
  163. ifeq ($(ADK_TARGET_ARCH_ARC),y)
  164. ifeq ($(ADK_CPU_ARC700),y)
  165. $(SED) 's/.*\(CONFIG_ARC_CPU_HS\).*/# \1 is not set/' ${WRKBUILD}/.config
  166. $(SED) 's/.*\(CONFIG_ARC_CPU_700\).*/\1=y/' ${WRKBUILD}/.config
  167. endif
  168. ifeq ($(ADK_CPU_ARC_HS),y)
  169. $(SED) 's/.*\(CONFIG_ARC_CPU_700\).*/# \1 is not set/' ${WRKBUILD}/.config
  170. $(SED) 's/.*\(CONFIG_ARC_CPU_HS\).*/\1=y/' ${WRKBUILD}/.config
  171. endif
  172. endif
  173. # arm
  174. ifeq ($(ADK_TARGET_ARCH_ARM),y)
  175. ifeq ($(ADK_TARGET_ARCH_ARM_WITH_THUMB),y)
  176. $(SED) 's/.*\(COMPILE_IN_THUMB_MODE\).*/\1=y/' ${WRKBUILD}/.config
  177. $(SED) 's/.*\(UCLIBC_HAS_CONTEXT_FUNCS\).*/# \1 is not set/' ${WRKBUILD}/.config
  178. endif
  179. endif
  180. # cris
  181. ifeq ($(ADK_TARGET_ARCH_CRIS),y)
  182. ifeq ($(ADK_CPU_CRIS_V32),y)
  183. $(SED) 's/.*\(CONFIG_CRIS=\).*/# \1 is not set/' ${WRKBUILD}/.config
  184. $(SED) 's/.*\(CONFIG_CRISV32\).*/\1=y/' ${WRKBUILD}/.config
  185. endif
  186. ifeq ($(ADK_CPU_CRIS_V10),y)
  187. $(SED) 's/.*\(CONFIG_CRIS=\).*/\1=y/' ${WRKBUILD}/.config
  188. $(SED) 's/.*\(CONFIG_CRISV32\).*/# \1 is not set/' ${WRKBUILD}/.config
  189. endif
  190. endif
  191. # sh
  192. ifeq ($(ADK_TARGET_ARCH_SH),y)
  193. ifeq ($(ADK_CPU_SH4A),y)
  194. $(SED) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
  195. $(SED) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
  196. $(SED) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
  197. $(SED) 's/.*\(CONFIG_SH4=\).*/# \1 is not set/' ${WRKBUILD}/.config
  198. $(SED) 's/.*\(CONFIG_SH4A\).*/\1=y/' ${WRKBUILD}/.config
  199. echo foo
  200. cat ${WRKBUILD}/.config
  201. endif
  202. ifeq ($(ADK_CPU_SH4),y)
  203. $(SED) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
  204. $(SED) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
  205. $(SED) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
  206. $(SED) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
  207. $(SED) 's/.*\(CONFIG_SH4\).*/\1=y/' ${WRKBUILD}/.config
  208. endif
  209. ifeq ($(ADK_CPU_SH3),y)
  210. $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
  211. $(SED) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
  212. $(SED) 's/.*\(CONFIG_SH2\).*/# \1 is not set/' ${WRKBUILD}/.config
  213. $(SED) 's/.*\(CONFIG_SH4\).*/# \1 is not set/' ${WRKBUILD}/.config
  214. $(SED) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
  215. $(SED) 's/.*\(CONFIG_SH3\).*/\1=y/' ${WRKBUILD}/.config
  216. endif
  217. ifeq ($(ADK_CPU_SH2),y)
  218. $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
  219. $(SED) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
  220. $(SED) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
  221. $(SED) 's/.*\(CONFIG_SH4\).*/# \1 is not set/' ${WRKBUILD}/.config
  222. $(SED) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
  223. $(SED) 's/.*\(CONFIG_SH2\).*/\1=y/' ${WRKBUILD}/.config
  224. endif
  225. ifeq ($(ADK_CPU_SH2A),y)
  226. $(SED) 's/.*\(UCLIBC_HAS_FPU\).*/# \1 is not set/' ${WRKBUILD}/.config
  227. $(SED) 's/.*\(CONFIG_SH2A\).*/# \1 is not set/' ${WRKBUILD}/.config
  228. $(SED) 's/.*\(CONFIG_SH3\).*/# \1 is not set/' ${WRKBUILD}/.config
  229. $(SED) 's/.*\(CONFIG_SH4\).*/# \1 is not set/' ${WRKBUILD}/.config
  230. $(SED) 's/.*\(CONFIG_SH4A\).*/# \1 is not set/' ${WRKBUILD}/.config
  231. $(SED) 's/.*\(CONFIG_SH2A\).*/\1=y/' ${WRKBUILD}/.config
  232. endif
  233. endif
  234. # x86
  235. ifeq ($(ADK_TARGET_ARCH_X86),y)
  236. ifeq ($(ADK_CPU_I486),y)
  237. $(SED) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config
  238. $(SED) 's/.*\(CONFIG_586\).*/# \1 is not set/' ${WRKBUILD}/.config
  239. $(SED) 's/.*\(CONFIG_486\).*/\1=y/' ${WRKBUILD}/.config
  240. endif
  241. ifeq ($(ADK_CPU_I586),y)
  242. $(SED) 's/.*\(CONFIG_686\).*/# \1 is not set/' ${WRKBUILD}/.config
  243. $(SED) 's/.*\(CONFIG_586\).*/\1=y/' ${WRKBUILD}/.config
  244. $(SED) 's/.*\(CONFIG_486\).*/# \1 is not set/' ${WRKBUILD}/.config
  245. endif
  246. ifeq ($(ADK_CPU_I686),y)
  247. $(SED) 's/.*\(CONFIG_686\).*/\1=y/' ${WRKBUILD}/.config
  248. $(SED) 's/.*\(CONFIG_586\).*/# \1 is not set/' ${WRKBUILD}/.config
  249. $(SED) 's/.*\(CONFIG_486\).*/# \1 is not set/' ${WRKBUILD}/.config
  250. endif
  251. endif
  252. # mips64
  253. ifeq ($(ADK_TARGET_ARCH_MIPS64),y)
  254. ifeq ($(ADK_TARGET_ABI_N64),y)
  255. $(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/\1=y/' ${WRKBUILD}/.config
  256. $(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
  257. $(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
  258. endif
  259. ifeq ($(ADK_TARGET_ABI_N32),y)
  260. $(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' ${WRKBUILD}/.config
  261. $(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
  262. $(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
  263. endif
  264. ifeq ($(ADK_TARGET_ABI_O32),y)
  265. $(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' ${WRKBUILD}/.config
  266. $(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
  267. $(SED) 's/.*\(CONFIG_MIPS_N64_ABI\).*/# \1 is not set/' ${WRKBUILD}/.config
  268. endif
  269. endif
  270. echo N|PATH='$(HOST_PATH)' $(MAKE) $(UCLIBC_MAKEOPTS) -C $(WRKBUILD) \
  271. HOSTCC="$(HOST_CC)" \
  272. PREFIX=$(STAGING_TARGET_DIR) \
  273. DEVEL_PREFIX=/usr/ \
  274. RUNTIME_PREFIX=$(STAGING_TARGET_DIR) \
  275. UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
  276. UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
  277. oldconfig
  278. touch $@
  279. $(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
  280. PATH='$(HOST_PATH)' $(MAKE) $(UCLIBC_MAKEOPTS) -C $(WRKBUILD) \
  281. HOSTCC="$(HOST_CC)" \
  282. CC='$(TARGET_CC)' \
  283. PREFIX= \
  284. DEVEL_PREFIX=/usr/ \
  285. RUNTIME_PREFIX=/ \
  286. UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
  287. UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
  288. VERBOSE=1 \
  289. all
  290. touch $@
  291. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  292. PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
  293. HOSTCC="$(HOST_CC)" \
  294. CC='$(TARGET_CC)' \
  295. PREFIX=$(STAGING_TARGET_DIR) \
  296. DEVEL_PREFIX=/usr/ \
  297. DEVEL_PREFIX_LIB=/ \
  298. RUNTIME_PREFIX=/ \
  299. UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
  300. UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
  301. VERBOSE=1 \
  302. install_runtime install_dev
  303. PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
  304. HOSTCC="$(HOST_CC)" \
  305. CC='$(TARGET_CC)' \
  306. PREFIX= \
  307. DEVEL_PREFIX=/usr/ \
  308. RUNTIME_PREFIX=/ \
  309. UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
  310. UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
  311. TEST_INSTALLED_UCLIBC=1 \
  312. UCLIBC_ONLY=1 \
  313. VERBOSE=1 \
  314. test_compile test_gen
  315. touch $@
  316. include ${ADK_TOPDIR}/mk/toolchain.mk