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