lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # /*****************************************************************************
|
| 2 | #* °æÈ¨ËùÓÐ(C) 2013 ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾
|
| 3 | #*
|
| 4 | #* ÎļþÃû³Æ: Makefile
|
| 5 | #* Îļþ±êʶ: plat_mk
|
| 6 | #* ÄÚÈÝÕªÒª: ±àÒëÖ§³Åƽ̨×Óϵͳ
|
| 7 | #* ʹÓ÷½·¨:
|
| 8 | #*
|
| 9 | #* ÐÞ¸ÄÈÕÆÚ °æ±¾ºÅ Ð޸ıê¼Ç ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ
|
| 10 | #* -----------------------------------------------------------------------------
|
| 11 | #* 2013/01/01 V1.0 001 P98G ´´½¨
|
| 12 | #*
|
| 13 | # *****************************************************************************/
|
| 14 |
|
| 15 | include $(PRJ_PATH)/config/project.mk
|
| 16 |
|
| 17 | .PHONY :
|
| 18 |
|
| 19 | default: help
|
| 20 | lib: zplat
|
| 21 | clean: zplatclean
|
| 22 |
|
| 23 | #===============================================================================
|
| 24 | #help
|
| 25 | #===============================================================================
|
| 26 | help:
|
| 27 | @$(ECHO) "============Make help====================================="
|
| 28 | @$(ECHO) "make [help] help"
|
| 29 | @$(ECHO) "make zplat[clean] compile all moudle"
|
| 30 | @$(ECHO) ""
|
| 31 | @$(ECHO) "make oss[clean/help] make oss subsystem"
|
| 32 | @$(ECHO) "make drv[clean/help] make drv subsystem"
|
| 33 | @$(ECHO) ""
|
| 34 | @$(ECHO) "============Env============================================"
|
| 35 | @$(ECHO) "FLAVOR =$(FLAVOR)"
|
| 36 | @$(ECHO) "COMPILER =$(COMPILER)"
|
| 37 | @$(ECHO) "OSTYPE =$(OSTYPE)"
|
| 38 | @$(ECHO) "VERBOSE =$(VERBOSE)"
|
| 39 | @$(ECHO) "LINTCHK =$(LINTCHK)"
|
| 40 | @$(ECHO) "HOST =$(HOST)"
|
| 41 |
|
| 42 | #===============================================================================
|
| 43 | #ƽ̨±àÒë
|
| 44 | #===============================================================================
|
| 45 | ifeq ($(USE_PLAT_OSS),yes)
|
| 46 | PLAT_MODS += oss
|
| 47 | PLAT_MODS_CLEAN += ossclean
|
| 48 | endif
|
| 49 |
|
| 50 | ifeq ($(USE_PLAT_MMP),yes)
|
| 51 | PLAT_MODS += mmp
|
| 52 | PLAT_MODS_CLEAN += mmpclean
|
| 53 | endif
|
| 54 |
|
| 55 | ifeq ($(USE_PLAT_MSP),yes)
|
| 56 | PLAT_MODS += msp
|
| 57 | PLAT_MODS_CLEAN += mspclean
|
| 58 | endif
|
| 59 |
|
| 60 | ifeq ($(USE_PLAT_WBT),yes)
|
| 61 | PLAT_MODS += wbt
|
| 62 | PLAT_MODS_CLEAN += wbtclean
|
| 63 | endif
|
| 64 |
|
| 65 | zplat: $(PLAT_MODS)
|
| 66 | @$(ECHO) "--make plat done"
|
| 67 |
|
| 68 | zplatclean: $(PLAT_MODS_CLEAN) wraplibclean
|
| 69 | @$(ECHO) "--clean plat done"
|
| 70 |
|
| 71 | #===============================================================================
|
| 72 | #OS×Óϵͳ±àÒë
|
| 73 | #´Ë´¦²»ÄܲÉÓöàÏ̱߳àÒëMAKEOPTSÑ¡Ïî
|
| 74 | #===============================================================================
|
| 75 | PLAT_OSS_PATH = $(PLAT_PATH)/src/oss
|
| 76 | oss:
|
| 77 | @$(GNUMAKE) --no-print-directory -C $(PLAT_OSS_PATH)/ws lib
|
| 78 | ossclean:
|
| 79 | @$(GNUMAKE) --no-print-directory -C $(PLAT_OSS_PATH)/ws clean
|
| 80 |
|
| 81 | #===============================================================================
|
| 82 | # mmp
|
| 83 | #===============================================================================
|
| 84 | PLAT_MMP_PATH = $(PLAT_PATH)/src/mmp
|
| 85 | mmp:
|
| 86 | @$(GNUMAKE) --no-print-directory -C $(PLAT_MMP_PATH)/ws lib
|
| 87 | mmpclean:
|
| 88 | @$(GNUMAKE) --no-print-directory -C $(PLAT_MMP_PATH)/ws clean
|
| 89 |
|
| 90 | #===============================================================================
|
| 91 | # MSP×Óϵͳ±àÒë
|
| 92 | #===============================================================================
|
| 93 | PLAT_MSP_PATH = $(PLAT_PATH)/src/msp
|
| 94 | msp:
|
| 95 | @$(ECHO) "---Compile msp"
|
| 96 | @$(GNUMAKE) --no-print-directory -C $(PLAT_MSP_PATH)/ws lib
|
| 97 | @$(COPY) --force $(PLAT_LIB_INTERNAL_PATH)/plat_msp.a $(PLAT_LIB_EXTERNAL_PATH)
|
| 98 | mspclean:
|
| 99 | @$(GNUMAKE) --no-print-directory -C $(PLAT_MSP_PATH)/ws clean
|
| 100 |
|
| 101 | #===============================================================================
|
| 102 | # wbt×Óϵͳ±àÒë
|
| 103 | #===============================================================================
|
| 104 | PLAT_WBT_PATH = $(PLAT_PATH)/src/test/wbt
|
| 105 | wbt:
|
| 106 | @$(ECHO) "--to build wbt"
|
| 107 | @$(GNUMAKE) --no-print-directory -C $(PLAT_WBT_PATH)/ws lib
|
| 108 | @$(COPY) --force $(PLAT_LIB_INTERNAL_PATH)/plat_wbt.a $(PLAT_LIB_EXTERNAL_PATH)
|
| 109 | wbtclean:
|
| 110 | @$(ECHO) "--to clean wbt"
|
| 111 | @$(GNUMAKE) --no-print-directory -C $(PLAT_WBT_PATH)/ws clean
|
| 112 |
|
| 113 | #===============================================================================
|
| 114 | #´ò°ü×ÓÄ£¿éµÄ.a¿â
|
| 115 | #===============================================================================
|
| 116 | wraplib:
|
| 117 | @$(COPY) --force $(FINAL_LIB_TO_WARP) $(PLAT_LIB_EXTERNAL_PATH)
|
| 118 | # @$(AR) $(ARFLAGS) $(PLAT_PATH)/lib/$(PRJ_NAME)/$(FLAVOR)/plat.a $(FINAL_LIB_TO_WARP)
|
| 119 |
|
| 120 | wraplibclean:
|
| 121 | @$(RM) -rf $(PLAT_LIB_INTERNAL_PATH)
|
| 122 | @$(RM) -rf $(PLAT_LIB_EXTERNAL_PATH)/*.a
|