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 | |
linchen | cc23a94 | 2018-12-05 14:49:22 +0800 | [diff] [blame] | 63 | ifeq (CPPE, $(CHIP_TYPE)) |
| 64 | SUPPORT_CHIP = HPPE CPPE |
| 65 | endif |
| 66 | |
zhongjia | 57e08f8 | 2019-11-21 11:41:09 +0800 | [diff] [blame] | 67 | ifeq (MP, $(CHIP_TYPE)) |
Kyle Swenson | 044f5ff | 2021-03-16 14:38:27 -0600 | [diff] [blame] | 68 | SUPPORT_CHIP = SCOMPHY MP |
| 69 | endif |
| 70 | |
| 71 | ifeq ($(ISISC_ENABLE), enable) |
| 72 | SUPPORT_CHIP += ISISC |
zhongjia | 57e08f8 | 2019-11-21 11:41:09 +0800 | [diff] [blame] | 73 | endif |
| 74 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 75 | ifeq (ALL_CHIP, $(CHIP_TYPE)) |
| 76 | ifneq (TRUE, $(FAL)) |
| 77 | $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!) |
| 78 | endif |
Kyle Swenson | 044f5ff | 2021-03-16 14:38:27 -0600 | [diff] [blame] | 79 | SUPPORT_CHIP = ISIS ISISC SHIVA DESS HPPE CPPE SCOMPHY MP |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 80 | endif |
| 81 | |
mingxinh | 2066f35 | 2017-03-07 19:52:30 +0800 | [diff] [blame] | 82 | ifeq (NONHK_CHIP, $(CHIP_TYPE)) |
| 83 | ifneq (TRUE, $(FAL)) |
| 84 | $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!) |
| 85 | endif |
| 86 | SUPPORT_CHIP = ISIS ISISC SHIVA DESS |
| 87 | endif |
| 88 | |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 89 | ifndef SUPPORT_CHIP |
| 90 | $(error defined CHIP_TYPE isn't supported!) |
| 91 | endif |
| 92 | endif |
| 93 | |
| 94 | #define compile tool prefix |
| 95 | ifndef TOOLPREFIX |
| 96 | TOOLPREFIX=$(CPU)-$(OS)-uclibc- |
| 97 | endif |
| 98 | |
| 99 | DEBUG_ON=FALSE |
| 100 | OPT_FLAG= |
| 101 | LD_FLAG= |
| 102 | |
| 103 | SHELLOBJ=ssdk_sh |
| 104 | US_MOD=ssdk_us |
| 105 | KS_MOD=ssdk_ks |
| 106 | |
| 107 | ifeq (TRUE, $(KERNEL_MODE)) |
| 108 | RUNMODE=km |
| 109 | else |
| 110 | RUNMODE=um |
| 111 | endif |
| 112 | |
Yue Lun | dd6e3d9 | 2013-10-25 13:03:31 +0800 | [diff] [blame] | 113 | BLD_DIR=$(PRJ_PATH)/build/$(OS) |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 114 | BIN_DIR=$(PRJ_PATH)/build/bin |
| 115 | |
Kyle Swenson | 845ea37 | 2021-01-26 14:07:57 -0700 | [diff] [blame] | 116 | # cradlepoint ; show a useful version number |
Kyle Swenson | 0a22212 | 2021-04-06 06:30:59 -0600 | [diff] [blame^] | 117 | VER=QSDK-SPF11-3-CSU1 |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 118 | BUILD_NUMBER=$(shell cat $(PRJ_PATH)/make/.build_number) |
Kyle Swenson | 0a22212 | 2021-04-06 06:30:59 -0600 | [diff] [blame^] | 119 | VERSION=$(VER) |
Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 120 | BUILD_DATE=$(shell date -u +%F-%T) |