Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 1 | |
| 2 | include $(PRJ_PATH)/config |
| 3 | |
| 4 | ifndef SYS_PATH |
| 5 | $(error SYS_PATH isn't defined!) |
| 6 | endif |
| 7 | |
| 8 | ifndef TOOL_PATH |
| 9 | $(error TOOL_PATH isn't defined!) |
| 10 | endif |
| 11 | |
| 12 | #define cpu type such as PPC MIPS ARM X86 |
| 13 | ifndef CPU |
| 14 | CPU=mips |
| 15 | endif |
| 16 | |
| 17 | #define os type such as linux netbsd vxworks |
| 18 | ifndef OS |
| 19 | OS=linux |
| 20 | endif |
| 21 | |
| 22 | ifndef OS_VER |
| 23 | OS_VER=2_6 |
| 24 | endif |
| 25 | |
| 26 | #support chip type such as ATHENA GARUDA |
| 27 | ifndef CHIP_TYPE |
| 28 | SUPPORT_CHIP = GARUDA |
| 29 | else |
| 30 | ifeq (GARUDA, $(CHIP_TYPE)) |
| 31 | SUPPORT_CHIP = GARUDA |
| 32 | endif |
| 33 | |
| 34 | ifeq (ATHENA, $(CHIP_TYPE)) |
| 35 | SUPPORT_CHIP = ATHENA |
| 36 | endif |
| 37 | |
| 38 | ifeq (SHIVA, $(CHIP_TYPE)) |
| 39 | SUPPORT_CHIP = SHIVA |
| 40 | endif |
| 41 | |
| 42 | ifeq (HORUS, $(CHIP_TYPE)) |
| 43 | SUPPORT_CHIP = HORUS |
| 44 | endif |
| 45 | |
| 46 | ifeq (ISIS, $(CHIP_TYPE)) |
| 47 | SUPPORT_CHIP = ISIS |
| 48 | endif |
| 49 | |
| 50 | ifeq (ISISC, $(CHIP_TYPE)) |
| 51 | SUPPORT_CHIP = ISISC |
| 52 | endif |
| 53 | |
linchen | d4b91d0 | 2014-11-28 23:04:44 +0800 | [diff] [blame] | 54 | ifeq (DESS, $(CHIP_TYPE)) |
| 55 | SUPPORT_CHIP = DESS |
| 56 | endif |
| 57 | |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 58 | ifeq (HPPE, $(CHIP_TYPE)) |
| 59 | SUPPORT_CHIP = HPPE |
| 60 | endif |
| 61 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 62 | ifeq (ALL_CHIP, $(CHIP_TYPE)) |
| 63 | ifneq (TRUE, $(FAL)) |
| 64 | $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!) |
| 65 | endif |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 66 | SUPPORT_CHIP = ISIS ISISC SHIVA DESS HPPE |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 67 | endif |
| 68 | |
mingxinh | 2066f35 | 2017-03-07 19:52:30 +0800 | [diff] [blame] | 69 | ifeq (NONHK_CHIP, $(CHIP_TYPE)) |
| 70 | ifneq (TRUE, $(FAL)) |
| 71 | $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!) |
| 72 | endif |
| 73 | SUPPORT_CHIP = ISIS ISISC SHIVA DESS |
| 74 | endif |
| 75 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 76 | ifndef SUPPORT_CHIP |
| 77 | $(error defined CHIP_TYPE isn't supported!) |
| 78 | endif |
| 79 | endif |
| 80 | |
| 81 | #define compile tool prefix |
| 82 | ifndef TOOLPREFIX |
| 83 | TOOLPREFIX=$(CPU)-$(OS)-uclibc- |
| 84 | endif |
| 85 | |
| 86 | DEBUG_ON=FALSE |
| 87 | OPT_FLAG= |
| 88 | LD_FLAG= |
| 89 | |
| 90 | SHELLOBJ=ssdk_sh |
| 91 | US_MOD=ssdk_us |
| 92 | KS_MOD=ssdk_ks |
| 93 | |
| 94 | ifeq (TRUE, $(KERNEL_MODE)) |
| 95 | RUNMODE=km |
| 96 | else |
| 97 | RUNMODE=um |
| 98 | endif |
| 99 | |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 100 | BLD_DIR=$(PRJ_PATH)/build/$(OS) |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 101 | BIN_DIR=$(PRJ_PATH)/build/bin |
| 102 | |
mingxinh | 7458b24 | 2017-02-21 18:30:24 +0800 | [diff] [blame] | 103 | VER=2.0.0 |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 104 | BUILD_NUMBER=$(shell cat $(PRJ_PATH)/make/.build_number) |
| 105 | VERSION=$(VER).$(BUILD_NUMBER) |
| 106 | BUILD_DATE=$(shell date -u +%F-%T) |