blob: 828eb59aca010ade486ff5c4ff779cddcf924753 [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
Yue Lun03a82d92013-10-21 10:15:02 +080063 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 Jieb8ba5f72017-10-19 14:57:25 +080067 SUPPORT_CHIP = ISIS ISISC SHIVA DESS HPPE SCOMPHY
Yue Lun03a82d92013-10-21 10:15:02 +080068 endif
69
mingxinh2066f352017-03-07 19:52:30 +080070 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 Lun03a82d92013-10-21 10:15:02 +080077 ifndef SUPPORT_CHIP
78 $(error defined CHIP_TYPE isn't supported!)
79 endif
80endif
81
82#define compile tool prefix
83ifndef TOOLPREFIX
84 TOOLPREFIX=$(CPU)-$(OS)-uclibc-
85endif
86
87DEBUG_ON=FALSE
88OPT_FLAG=
89LD_FLAG=
90
91SHELLOBJ=ssdk_sh
92US_MOD=ssdk_us
93KS_MOD=ssdk_ks
94
95ifeq (TRUE, $(KERNEL_MODE))
96 RUNMODE=km
97else
98 RUNMODE=um
99endif
100
Yue Lundd6e3d92013-10-25 13:03:31 +0800101BLD_DIR=$(PRJ_PATH)/build/$(OS)
Yue Lun03a82d92013-10-21 10:15:02 +0800102BIN_DIR=$(PRJ_PATH)/build/bin
103
mingxinh7458b242017-02-21 18:30:24 +0800104VER=2.0.0
Yue Lun03a82d92013-10-21 10:15:02 +0800105BUILD_NUMBER=$(shell cat $(PRJ_PATH)/make/.build_number)
106VERSION=$(VER).$(BUILD_NUMBER)
107BUILD_DATE=$(shell date -u +%F-%T)