Advertisement
Guest User

Makefile

a guest
Jun 25th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 15.19 KB | None | 0 0
  1. ifeq ($(WIFI_MODE),)
  2. RT28xx_MODE = STA
  3. else
  4. RT28xx_MODE = $(WIFI_MODE)
  5. endif
  6.  
  7. ifeq ($(TARGET),)
  8. TARGET = LINUX
  9. endif
  10.  
  11. # CHIPSET
  12. # rt2860, rt2870, rt2880, rt2070, rt3070, rt3090, rt3572, rt3062, rt3562, rt3593, rt3573
  13. # rt3562(for rt3592), rt3050, rt3350, rt3352, rt5350, rt5370, rt5390, rt5572, rt5592,
  14. # rt8592(for rt85592), mt7650e, mt7630e, mt7610e, mt7650u, mt7630u, mt7610u
  15.  
  16. ifeq ($(CHIPSET),)
  17. CHIPSET = mt7650u mt7630u mt7610u
  18. endif
  19.  
  20. MODULE = $(word 1, $(CHIPSET))
  21.  
  22. #OS ABL - YES or NO
  23. OSABL = NO
  24.  
  25. ifneq ($(TARGET),THREADX)
  26. #RT28xx_DIR = home directory of RT28xx source code
  27. RT28xx_DIR = $(shell pwd)
  28. endif
  29.  
  30. include $(RT28xx_DIR)/os/linux/config.mk
  31.  
  32. RTMP_SRC_DIR = $(RT28xx_DIR)/RT$(MODULE)
  33.  
  34. #PLATFORM: Target platform
  35. PLATFORM = PC
  36. #PLATFORM = 5VT
  37. #PLATFORM = IKANOS_V160
  38. #PLATFORM = IKANOS_V180
  39. #PLATFORM = SIGMA
  40. #PLATFORM = SIGMA_8622
  41. #PLATFORM = INIC
  42. #PLATFORM = STAR
  43. #PLATFORM = IXP
  44. #PLATFORM = INF_TWINPASS
  45. #PLATFORM = INF_DANUBE
  46. #PLATFORM = INF_AR9
  47. #PLATFORM = INF_VR9
  48. #PLATFORM = BRCM_6358
  49. #PLATFORM = INF_AMAZON_SE
  50. #PLATFORM = CAVM_OCTEON
  51. #PLATFORM = CMPC
  52. #PLATFORM = RALINK_2880
  53. #PLATFORM = RALINK_3052
  54. #PLATFORM = SMDK
  55. #PLATFORM = RMI
  56. #PLATFORM = RMI_64
  57. #PLATFORM = KODAK_DC
  58. #PLATFORM = DM6446
  59. #PLATFORM = FREESCALE8377
  60. #PLATFORM = BL2348
  61. #PLATFORM = BL23570
  62. #PLATFORM = BLUBB
  63. #PLATFORM = BLPMP
  64. #PLATFORM = MT85XX
  65. #PLATFORM = MT53XX
  66. #PLATFORM = NXP_TV550
  67. #PLATFORM = MVL5
  68. #PLATFORM = RALINK_3352
  69. #PLATFORM = UBICOM_IPX8
  70. #PLATFORM = INTELP6
  71.  
  72. #APSOC
  73. ifeq ($(MODULE),3050)
  74. PLATFORM = RALINK_3050
  75. endif
  76. ifeq ($(MODULE),3052)
  77. PLATFORM = RALINK_3052
  78. endif
  79. ifeq ($(MODULE),3350)
  80. PLATFORM = RALINK_3050
  81. endif
  82. ifeq ($(MODULE),3352)
  83. PLATFORM = RALINK_3352
  84. endif
  85.  
  86.  
  87. #RELEASE Package
  88. RELEASE = DPO
  89.  
  90.  
  91. ifeq ($(TARGET),LINUX)
  92. MAKE = make
  93. endif
  94.  
  95. ifeq ($(TARGET), UCOS)
  96. MAKE = make
  97. endif
  98. ifeq ($(TARGET),THREADX)
  99. MAKE = gmake
  100. endif
  101.  
  102. ifeq ($(TARGET), ECOS)
  103. MAKE = make
  104. MODULE = $(shell pwd | sed "s/.*\///" ).o
  105. export MODULE
  106. endif
  107.  
  108. ifeq ($(PLATFORM),5VT)
  109. LINUX_SRC = /home/ralink-2860-sdk-5vt-distribution/linux-2.6.17
  110. CROSS_COMPILE = /opt/crosstool/uClibc_v5te_le_gcc_4_1_1/bin/arm-linux-
  111. endif
  112.  
  113. ifeq ($(PLATFORM),UBICOM_IPX8)
  114. LINUX_SRC = /home/sample/Customers/UBICOM/ubicom-linux-dist-2.1.1/linux-2.6.x
  115. CROSS_COMPILE = ubicom32-elf-
  116. endif
  117.  
  118. ifeq ($(PLATFORM),IKANOS_V160)
  119. LINUX_SRC = /home/sample/projects/LX_2618_RG_5_3_00r4_SRC/linux-2.6.18
  120. CROSS_COMPILE = mips-linux-
  121. endif
  122.  
  123. ifeq ($(PLATFORM),IKANOS_V180)
  124. LINUX_SRC = /home/sample/projects/LX_BSP_VX180_5_4_0r1_ALPHA_26DEC07/linux-2.6.18
  125. CROSS_COMPILE = mips-linux-
  126. endif
  127.  
  128. ifeq ($(PLATFORM),SIGMA)
  129. LINUX_SRC = /root/sigma/smp86xx_kernel_source_2.7.172.0/linux-2.6.15
  130. CROSS_COMPILE = /root/sigma/smp86xx_toolchain_2.7.172.0/build_mipsel_nofpu/staging_dir/bin/mipsel-linux-
  131. endif
  132.  
  133. ifeq ($(PLATFORM),SIGMA_8622)
  134. LINUX_SRC = /home/snowpin/armutils_2.5.120.1/build_arm/linux-2.4.22-em86xx
  135. CROSS_COMPILE = /home/snowpin/armutils_2.5.120.1/toolchain/bin/arm-elf-
  136. CROSS_COMPILE_INCLUDE = /home/snowpin/armutils_2.5.120.1/toolchain/lib/gcc-lib/arm-elf/2.95.3
  137. endif
  138.  
  139. ifeq ($(PLATFORM),INIC)
  140. UCOS_SRC = /opt/uCOS/iNIC_rt2880
  141. CROSS_COMPILE = /usr/bin/mipsel-linux-
  142. endif
  143.  
  144. ifeq ($(PLATFORM),STAR)
  145. LINUX_SRC = /opt/star/kernel/linux-2.4.27-star
  146. CROSS_COMPILE = /opt/star/tools/arm-linux/bin/arm-linux-
  147. endif
  148.  
  149. ifeq ($(PLATFORM),RMI)
  150. LINUX_SRC = /opt/rmi/1.7.0/linux/src/
  151. CROSS_COMPILE = /opt/rmi/1.7.0/mipscross/nptl/bin/mips64-unknown-linux-gnu-
  152. endif
  153.  
  154. ifeq ($(PLATFORM),RMI_64)
  155. LINUX_SRC = /opt/rmi/1.7.0/linux_64/src/
  156. CROSS_COMPILE = /opt/rmi/1.7.0/mipscross/nptl/bin/mips64-unknown-linux-gnu-
  157. endif
  158.  
  159. ifeq ($(PLATFORM), RALINK_2880)
  160. LINUX_SRC = /project/stable/RT288x/RT288x_SDK/source/linux-2.4.x
  161. CROSS_COMPILE = /opt/buildroot-gdb/bin/mipsel-linux-
  162. endif
  163.  
  164. ifeq ($(PLATFORM),RALINK_3052)
  165. LINUX_SRC = /home/peter/ap_soc/SDK_3_3_0_0/RT288x_SDK/source/linux-2.6.21.x
  166. CROSS_COMPILE = /opt/buildroot-gcc342/bin/mipsel-linux-uclibc-
  167. endif
  168.  
  169. ifeq ($(PLATFORM),FREESCALE8377)
  170. LINUX_SRC = /opt/ltib-mpc8377_rds-20090309/rpm/BUILD/linux-2.6.25
  171. CROSS_COMPILE = /opt/freescale/usr/local/gcc-4.2.187-eglibc-2.5.187/powerpc-linux-gnu/bin/powerpc-linux-gnu-
  172. endif
  173.  
  174. ifeq ($(PLATFORM),BL2348)
  175. LINUX_SRC = /home/sample/Customers/BroadLight/bl234x-linux-2.6.21-small-v29
  176. CROSS_COMPILE = mips-wrs-linux-gnu-
  177. endif
  178.  
  179. ifeq ($(PLATFORM),BL23570)
  180. LINUX_SRC = /home/FIBERHOME/linux-2.6.34.8
  181. CROSS_COMPILE = mips-wrs-linux-gnu-mips_74k_softfp-glibc_small-
  182. ARCH:=mips
  183. export $ARCH
  184. endif
  185.  
  186.  
  187. ifeq ($(PLATFORM),BLUBB)
  188. LINUX_SRC = /home/sample/Customers/BroadLight/UBB/gmp20/linux-2.6.21-small
  189. CROSS_COMPILE = mips-wrs-linux-gnu-
  190. endif
  191.  
  192. ifeq ($(PLATFORM),BLPMP)
  193. LINUX_SRC = /home/sample/Customers/BroadLight/UBB/pmp16/bl234x-linux-2.6.21-small-v30.2
  194. CROSS_COMPILE = mips-wrs-linux-gnu-
  195. endif
  196.  
  197. ifeq ($(PLATFORM),PC)
  198. # Linux 2.6
  199. LINUX_SRC = /lib/modules/$(shell uname -r)/build
  200. # Linux 2.4 Change to your local setting
  201. #LINUX_SRC = /usr/src/linux-2.4
  202. LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
  203. CROSS_COMPILE =
  204. endif
  205.  
  206. ifeq ($(PLATFORM),INTELP6)
  207. LINUX_SRC = /tftpboot/IntelCE-20.0.11052.243193/project_build_i686/IntelCE/kernel-20.0.11024.238456/linux-2.6.35
  208. CROSS_COMPILE = /tftpboot/IntelCE-20.0.11052.243193/build_i686/i686-linux-elf/bin/i686-cm-linux-
  209. endif
  210.  
  211. ifeq ($(PLATFORM),IXP)
  212. LINUX_SRC = /project/stable/Gmtek/snapgear-uclibc/linux-2.6.x
  213. CROSS_COMPILE = arm-linux-
  214. endif
  215.  
  216. ifeq ($(PLATFORM),INF_TWINPASS)
  217. # Linux 2.6
  218. #LINUX_SRC = /lib/modules/$(shell uname -r)/build
  219. # Linux 2.4 Change to your local setting
  220. LINUX_SRC = /project/stable/twinpass/release/2.0.1/source/kernel/opensource/linux-2.4.31/
  221. CROSS_COMPILE = mips-linux-
  222. endif
  223.  
  224. ifeq ($(PLATFORM),INF_DANUBE)
  225. LINUX_SRC = /opt/danube/sdk/linux-2.6.16.x
  226. CROSS_COMPILE = mips-linux-
  227. ROOTDIR = /opt/danube/sdk
  228. export ROOTDIR
  229. endif
  230.  
  231. ifeq ($(PLATFORM),INF_AR9)
  232. LINUX_SRC = /root/ar9/xR9_BSP1.2.2.0/source/kernel/opensource/linux-2.6.20/
  233. CROSS_COMPILE = /root/ar9/ifx-lxdb26-1.0.2/gcc-3.4.4/toolchain-mips/bin/
  234. endif
  235.  
  236. ifeq ($(PLATFORM),INF_VR9)
  237. LINUX_SRC = /home/public/lantiq/VR9/UGW-4.2/build_dir/linux-ifxcpe_platform_vr9/linux-2.6.20.19
  238. CROSS_COMPILE = /home/public/lantiq/VR9/UGW-4.2/staging_dir/toolchain-mips_gcc-3.4.6_uClibc-0.9.29/bin/mips-linux-
  239. endif
  240.  
  241. ifeq ($(PLATFORM),BRCM_6358)
  242. LINUX_SRC =
  243. CROSS_COMPILE =
  244. endif
  245.  
  246. ifeq ($(PLATFORM),INF_AMAZON_SE)
  247. # Linux 2.6
  248. #LINUX_SRC = /lib/modules/$(shell uname -r)/build
  249. # Linux 2.4 Change to your local setting
  250. LINUX_SRC = /backup/ifx/3.6.2.2/source/kernel/opensource/linux-2.4.31
  251. #CROSS_COMPILE = mips-linux-
  252. #LINUX_SRC = /project/Infineon/3.6.2.2/source/kernel/opensource/linux-2.4.31
  253. CROSS_COMPILE = /opt/uclibc-toolchain/ifx-lxdb-1-2-3-external/gcc-3.3.6/toolchain-mips/R0208V35/mips-linux-uclibc/bin/
  254. endif
  255.  
  256. ifeq ($(PLATFORM),ST)
  257. LINUX_SRC = /opt/STM/STLinux-2.2/devkit/sources/kernel/linux0039
  258. CROSS_COMPILE = /opt/STM/STLinux-2.2/devkit/sh4/bin/sh4-linux-
  259. ARCH := sh
  260. export ARCH
  261. endif
  262.  
  263. ifeq ($(PLATFORM),CAVM_OCTEON)
  264. OCTEON_ROOT = /usr/local/Cavium_Networks/OCTEON-SDK
  265. LINUX_SRC = $(OCTEON_ROOT)/linux/kernel_2.6/linux
  266. CROSS_COMPILE = mips64-octeon-linux-gnu-
  267. endif
  268.  
  269. ifeq ($(PLATFORM),CMPC)
  270. LINUX_SRC = /opt/fvt_11N_SDK_0807/fvt131x_SDK_11n/linux-2.6.17
  271. CROSS_COMPILE =
  272. endif
  273.  
  274. ifeq ($(PLATFORM),SMDK)
  275. LINUX_SRC = /home/bhushan/itcenter/may28/linux-2.6-samsung
  276. CROSS_COMPILE = /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-
  277. endif
  278.  
  279. ifeq ($(PLATFORM),RALINK_3352)
  280. LINUX_SRC = /home/sample/3352/RT288x_SDK/source/linux-2.6.21.x
  281. CROSS_COMPILE = /opt/buildroot-gcc342/bin/mipsel-linux-
  282. endif
  283.  
  284. ifeq ($(PLATFORM),KODAK_DC)
  285. SKD_SRC = C:/SigmaTel/DC1250_SDK_v1-9/sdk
  286. CROSS_COMPILE = $(cc)
  287. endif
  288.  
  289. ifeq ($(PLATFORM),DM6446)
  290. LINUX_SRC = /home/fonchi/work/soc/ti-davinci
  291. endif
  292.  
  293. ifeq ($(PLATFORM),MT85XX)
  294. LINUX_SRC = $(RT28xx_DIR)/../../../../build_linux
  295. ifeq ($(CROSS_COMPILE),)
  296. CROSS_COMPILE=armv7a-mediatek451_001_vfp-linux-gnueabi-
  297. endif
  298. CC=$(CROSS_COMPILE)gcc
  299. $(warning =============================================)
  300. $(warning CC=$(CC) for wifi driver)
  301. $(warning =============================================)
  302. endif
  303.  
  304. ifeq ($(PLATFORM),NXP_TV550)
  305. LINUX_SRC = /data/tv550/kernel/linux-2.6.28.9
  306. LINUX_SRC_MODULE = /data/tv550/kernel/linux-2.6.28.9/drivers/net/wireless
  307. CROSS_COMPILE = /opt/embeddedalley/nxp_tv550/bin/mipsel-linux-
  308. endif
  309.  
  310. ifeq ($(PLATFORM),MVL5)
  311. LINUX_SRC = /home2/charlestu/AP-VT3426/linux-2.6.18
  312. CROSS_COMPILE = /opt/montavista/pro/devkit/arm/v5t_le_mvl5/bin/arm_v5t_le-
  313. endif
  314.  
  315. export OSABL RT28xx_DIR RT28xx_MODE LINUX_SRC CROSS_COMPILE CROSS_COMPILE_INCLUDE PLATFORM RELEASE CHIPSET MODULE RTMP_SRC_DIR LINUX_SRC_MODULE TARGET HAS_WOW_SUPPORT
  316.  
  317. # The targets that may be used.
  318. PHONY += all build_tools test UCOS THREADX LINUX release prerelease clean uninstall install libwapi osabl
  319.  
  320. ifeq ($(TARGET),LINUX)
  321. all: build_tools $(TARGET)
  322. else
  323. all: $(TARGET)
  324. endif
  325.  
  326.  
  327.  
  328. build_tools:
  329.     $(MAKE) -C tools
  330.     $(RT28xx_DIR)/tools/bin2h
  331.  
  332. test:
  333.     $(MAKE) -C tools test
  334.  
  335. UCOS:
  336.     $(MAKE) -C os/ucos/ MODE=$(RT28xx_MODE)
  337.     echo $(RT28xx_MODE)
  338.  
  339. ECOS:
  340.     $(MAKE) -C os/ecos/ MODE=$(RT28xx_MODE)
  341.     cp -f os/ecos/$(MODULE) $(MODULE)
  342.  
  343. THREADX:
  344.     $(MAKE) -C $(RT28xx_DIR)/os/Threadx -f $(RT28xx_DIR)/os/ThreadX/Makefile
  345.  
  346. LINUX:
  347. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  348.  
  349. ifeq ($(OSABL),YES)
  350.     cp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile
  351.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  352. endif
  353.  
  354.     cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
  355.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  356.  
  357. ifeq ($(OSABL),YES)
  358.     cp -f os/linux/Makefile.4.netif $(RT28xx_DIR)/os/linux/Makefile
  359.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  360. endif
  361.  
  362. ifeq ($(RT28xx_MODE),AP)
  363.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_ap.o /tftpboot
  364. ifeq ($(OSABL),YES)
  365.     cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)_ap.o /tftpboot
  366.     cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)_ap.o /tftpboot
  367. endif
  368. ifeq ($(PLATFORM),INF_AMAZON_SE)
  369.     cp -f /tftpboot/rt2870ap.o /backup/ifx/build/root_filesystem/lib/modules/2.4.31-Amazon_SE-3.6.2.2-R0416_Ralink/kernel/drivers/net
  370. endif
  371. else   
  372. ifeq ($(RT28xx_MODE),APSTA)
  373.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_apsta.o /tftpboot
  374. ifeq ($(OSABL),YES)
  375.     cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)_apsta.o /tftpboot
  376.     cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)_apsta.o /tftpboot
  377. endif
  378. else
  379.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_sta.o /tftpboot
  380. ifeq ($(OSABL),YES)
  381.     cp -f $(RT28xx_DIR)/os/linux/rtutil$(MODULE)_sta.o /tftpboot
  382.     cp -f $(RT28xx_DIR)/os/linux/rtnet$(MODULE)_sta.o /tftpboot
  383. endif
  384. endif  
  385. endif  
  386. else
  387.  
  388. ifeq ($(OSABL),YES)
  389.     cp -f os/linux/Makefile.6.util $(RT28xx_DIR)/os/linux/Makefile
  390.     $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  391. endif
  392.  
  393.     cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
  394. ifeq ($(PLATFORM),DM6446)
  395.     $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  396. else
  397. ifeq ($(PLATFORM),FREESCALE8377)
  398.     $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  399. else
  400.     $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  401. endif
  402. endif
  403.  
  404. ifeq ($(OSABL),YES)
  405.     cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
  406.     $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  407. endif
  408.  
  409. ifeq ($(RT28xx_MODE),AP)
  410.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_ap.ko /tftpboot
  411. ifeq ($(OSABL),YES)
  412.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_ap_util.ko /tftpboot
  413.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_ap_net.ko /tftpboot
  414. endif
  415.     rm -f os/linux/$(MODULE)_ap.ko.lzma
  416.     /root/bin/lzma e os/linux/$(MODULE)_ap.ko os/linux/$(MODULE)_ap.ko.lzma
  417. else   
  418. ifeq ($(RT28xx_MODE),APSTA)
  419.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_apsta.ko /tftpboot
  420. ifeq ($(OSABL),YES)
  421.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_apsta_util.ko /tftpboot
  422.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_apsta_net.ko /tftpboot
  423. endif
  424. else
  425.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_sta.ko /tftpboot 2>/dev/null || :
  426. ifeq ($(OSABL),YES)
  427.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_sta_util.ko /tftpboot 2>/dev/null || :
  428.     cp -f $(RT28xx_DIR)/os/linux/$(MODULE)_sta_net.ko /tftpboot 2>/dev/null || :
  429. endif
  430. ifeq ($(PLATFORM),MT85XX)
  431.     cp -f $(RT28xx_DIR)/os/linux/rtsta.ko $(RT28xx_DIR)/../../../../../BDP_Generic/build_linux_ko/src/driver/wlan/
  432. endif
  433. endif
  434. endif
  435. endif
  436.  
  437.  
  438. release: build_tools
  439.     $(MAKE) -C $(RT28xx_DIR)/striptool -f Makefile.release clean
  440.     $(MAKE) -C $(RT28xx_DIR)/striptool -f Makefile.release
  441.     striptool/striptool.out
  442. ifeq ($(RELEASE), DPO)
  443.     gcc -o striptool/banner striptool/banner.c
  444.     ./striptool/banner -b striptool/copyright.gpl -s DPO/ -d DPO_GPL -R
  445.     ./striptool/banner -b striptool/copyright.frm -s DPO_GPL/include/firmware.h
  446. endif
  447.  
  448. prerelease:
  449. ifeq ($(MODULE), 2880)
  450.     $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.release.2880 prerelease
  451. else
  452.     $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.release prerelease
  453. endif
  454.     cp $(RT28xx_DIR)/os/linux/Makefile.DPB $(RTMP_SRC_DIR)/os/linux/.
  455.     cp $(RT28xx_DIR)/os/linux/Makefile.DPA $(RTMP_SRC_DIR)/os/linux/.
  456.     cp $(RT28xx_DIR)/os/linux/Makefile.DPC $(RTMP_SRC_DIR)/os/linux/.
  457. ifeq ($(RT28xx_MODE),STA)
  458.     cp $(RT28xx_DIR)/os/linux/Makefile.DPD $(RTMP_SRC_DIR)/os/linux/.
  459.     cp $(RT28xx_DIR)/os/linux/Makefile.DPO $(RTMP_SRC_DIR)/os/linux/.
  460. endif  
  461.  
  462. clean:
  463. ifeq ($(TARGET), LINUX)
  464.     cp -f os/linux/Makefile.clean os/linux/Makefile
  465.     $(MAKE) -C os/linux clean
  466.     rm -rf os/linux/Makefile
  467. endif  
  468. ifeq ($(TARGET), UCOS)
  469.     $(MAKE) -C os/ucos clean MODE=$(RT28xx_MODE)
  470. endif
  471. ifeq ($(TARGET), ECOS)
  472.     $(MAKE) -C os/ecos clean MODE=$(RT28xx_MODE)
  473. endif
  474.  
  475. uninstall:
  476. ifeq ($(TARGET), LINUX)
  477. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  478.     $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 uninstall
  479. else
  480.     $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 uninstall
  481. endif
  482. endif
  483.  
  484. install:
  485. ifeq ($(TARGET), LINUX)
  486. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  487.     $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.4 install
  488. else
  489.     $(MAKE) -C $(RT28xx_DIR)/os/linux -f Makefile.6 install
  490. endif
  491. endif
  492.  
  493. libwapi:
  494. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  495.     cp -f os/linux/Makefile.libwapi.4 $(RT28xx_DIR)/os/linux/Makefile
  496.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  497. else
  498.     cp -f os/linux/Makefile.libwapi.6 $(RT28xx_DIR)/os/linux/Makefile  
  499.     $(MAKE) -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  500. endif  
  501.  
  502. osutil:
  503. ifeq ($(OSABL),YES)
  504. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  505.     cp -f os/linux/Makefile.4.util $(RT28xx_DIR)/os/linux/Makefile
  506.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  507. else
  508.     cp -f os/linux/Makefile.6.util $(RT28xx_DIR)/os/linux/Makefile
  509.     $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  510. endif
  511. endif
  512.  
  513. osnet:
  514. ifeq ($(OSABL),YES)
  515. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  516.     cp -f os/linux/Makefile.4.netif $(RT28xx_DIR)/os/linux/Makefile
  517.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  518. else
  519.     cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
  520.     $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  521. endif
  522. endif
  523.  
  524. osdrv:
  525. ifneq (,$(findstring 2.4,$(LINUX_SRC)))
  526.     cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
  527.     $(MAKE) -C $(RT28xx_DIR)/os/linux/
  528. else
  529.     cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
  530.     $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
  531. endif
  532.  
  533. # Declare the contents of the .PHONY variable as phony.  We keep that information in a variable
  534. .PHONY: $(PHONY)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement