blob: 6035859991907ee092b4e516e3240be86cbc1a37 [file] [log] [blame]
Yue Lun03a82d92013-10-21 10:15:02 +08001
2include $(PRJ_PATH)/config
xiaofeis9de826e2018-05-03 18:04:52 +08003-include $(SYS_PATH)/include/config/auto.conf
Yue Lun03a82d92013-10-21 10:15:02 +08004
5ifndef SYS_PATH
6 $(error SYS_PATH isn't defined!)
7endif
8
9ifndef TOOL_PATH
10 $(error TOOL_PATH isn't defined!)
11endif
12
13#define cpu type such as PPC MIPS ARM X86
14ifndef CPU
15 CPU=mips
16endif
17
18#define os type such as linux netbsd vxworks
19ifndef OS
20 OS=linux
21endif
22
23ifndef OS_VER
24 OS_VER=2_6
25endif
26
27#support chip type such as ATHENA GARUDA
28ifndef CHIP_TYPE
29 SUPPORT_CHIP = GARUDA
30else
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
linchend4b91d02014-11-28 23:04:44 +080055 ifeq (DESS, $(CHIP_TYPE))
56 SUPPORT_CHIP = DESS
57 endif
58
mingxinh7458b242017-02-21 18:30:24 +080059 ifeq (HPPE, $(CHIP_TYPE))
60 SUPPORT_CHIP = HPPE
61 endif
62
linchencc23a942018-12-05 14:49:22 +080063 ifeq (CPPE, $(CHIP_TYPE))
64 SUPPORT_CHIP = HPPE CPPE
65 endif
66
zhongjia57e08f82019-11-21 11:41:09 +080067 ifeq (MP, $(CHIP_TYPE))
Kyle Swenson044f5ff2021-03-16 14:38:27 -060068 SUPPORT_CHIP = SCOMPHY MP
69 endif
70
71 ifeq ($(ISISC_ENABLE), enable)
72 SUPPORT_CHIP += ISISC
zhongjia57e08f82019-11-21 11:41:09 +080073 endif
74
Yue Lun03a82d92013-10-21 10:15:02 +080075 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 Swenson044f5ff2021-03-16 14:38:27 -060079 SUPPORT_CHIP = ISIS ISISC SHIVA DESS HPPE CPPE SCOMPHY MP
Yue Lun03a82d92013-10-21 10:15:02 +080080 endif
81
mingxinh2066f352017-03-07 19:52:30 +080082 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 Lun03a82d92013-10-21 10:15:02 +080089 ifndef SUPPORT_CHIP
90 $(error defined CHIP_TYPE isn't supported!)
91 endif
92endif
93
94#define compile tool prefix
95ifndef TOOLPREFIX
96 TOOLPREFIX=$(CPU)-$(OS)-uclibc-
97endif
98
99DEBUG_ON=FALSE
100OPT_FLAG=
101LD_FLAG=
102
103SHELLOBJ=ssdk_sh
104US_MOD=ssdk_us
105KS_MOD=ssdk_ks
106
107ifeq (TRUE, $(KERNEL_MODE))
108 RUNMODE=km
109else
110 RUNMODE=um
111endif
112
Yue Lundd6e3d92013-10-25 13:03:31 +0800113BLD_DIR=$(PRJ_PATH)/build/$(OS)
Yue Lun03a82d92013-10-21 10:15:02 +0800114BIN_DIR=$(PRJ_PATH)/build/bin
115
Kyle Swenson845ea372021-01-26 14:07:57 -0700116# cradlepoint ; show a useful version number
Kyle Swenson0a222122021-04-06 06:30:59 -0600117VER=QSDK-SPF11-3-CSU1
Yue Lun03a82d92013-10-21 10:15:02 +0800118BUILD_NUMBER=$(shell cat $(PRJ_PATH)/make/.build_number)
Kyle Swenson0a222122021-04-06 06:30:59 -0600119VERSION=$(VER)
Yue Lun03a82d92013-10-21 10:15:02 +0800120BUILD_DATE=$(shell date -u +%F-%T)