This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
47 lines (37 loc) · 1.45 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#####################################################################
#### Please don't change this file. Use Makefile-user.mk instead ####
#####################################################################
# Including user Makefile.
# Should be used to set project-specific parameters
include ./Makefile-user.mk
#### GIT VERSION Information #####
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
ifndef GIT_VERSION
$(info no GIT_VERSION available, using unknown)
GIT_VERSION = "unknown"
endif
GIT_DATE := $(firstword $(shell git --no-pager show --date=short --format="%ad" --name-only))
ifndef GIT_DATE
$(info no GIT_DATE available, using unknown)
GIT_DATE = "unknown"
endif
FW_VERSION := `cat VERSION`
ifndef FW_VERSION
$(error can not find VERSION file - please ensure the source code is complete)
endif
USER_CFLAGS += -DGITVERSION=\"$(GIT_VERSION)\" -DGITDATE=\"$(GIT_DATE)\" -DFWVERSION=\"$(FW_VERSION)\"
# Important parameters check.
# We need to make sure SMING_HOME and ESP_HOME variables are set.
# You can use Makefile-user.mk in each project or use enviromental variables to set it globally.
ifndef SMING_HOME
$(error SMING_HOME is not set. Please configure it in Makefile-user.mk)
endif
ifndef ESP_HOME
$(error ESP_HOME is not set. Please configure it in Makefile-user.mk)
endif
# Include main Sming Makefile
ifeq ($(RBOOT_ENABLED), 1)
include $(SMING_HOME)/Makefile-rboot.mk
else
include $(SMING_HOME)/Makefile-project.mk
endif