blob: 9b2e93e7eec15a899ff4f9e84325490458f5eb5f [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
Yue Lun03a82d92013-10-21 10:15:02 +080067 ifeq (ALL_CHIP, $(CHIP_TYPE))
68 ifneq (TRUE, $(FAL))
69 $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!)
70 endif
linchencc23a942018-12-05 14:49:22 +080071 SUPPORT_CHIP = ISIS ISISC SHIVA DESS HPPE CPPE SCOMPHY
Yue Lun03a82d92013-10-21 10:15:02 +080072 endif
73
mingxinh2066f352017-03-07 19:52:30 +080074 ifeq (NONHK_CHIP, $(CHIP_TYPE))
75 ifneq (TRUE, $(FAL))
76 $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!)
77 endif
78 SUPPORT_CHIP = ISIS ISISC SHIVA DESS
79 endif
80
Yue Lun03a82d92013-10-21 10:15:02 +080081 ifndef SUPPORT_CHIP
82 $(error defined CHIP_TYPE isn't supported!)
83 endif
84endif
85
86#define compile tool prefix
87ifndef TOOLPREFIX
88 TOOLPREFIX=$(CPU)-$(OS)-uclibc-
89endif
90
91DEBUG_ON=FALSE
92OPT_FLAG=
93LD_FLAG=
94
95SHELLOBJ=ssdk_sh
96US_MOD=ssdk_us
97KS_MOD=ssdk_ks
98
99ifeq (TRUE, $(KERNEL_MODE))
100 RUNMODE=km
101else
102 RUNMODE=um
103endif
104
Yue Lundd6e3d92013-10-25 13:03:31 +0800105BLD_DIR=$(PRJ_PATH)/build/$(OS)
Yue Lun03a82d92013-10-21 10:15:02 +0800106BIN_DIR=$(PRJ_PATH)/build/bin
107
mingxinh7458b242017-02-21 18:30:24 +0800108VER=2.0.0
Yue Lun03a82d92013-10-21 10:15:02 +0800109BUILD_NUMBER=$(shell cat $(PRJ_PATH)/make/.build_number)
110VERSION=$(VER).$(BUILD_NUMBER)
111BUILD_DATE=$(shell date -u +%F-%T)