-
Notifications
You must be signed in to change notification settings - Fork 1
/
easy_xc8.mk
48 lines (37 loc) · 1.28 KB
/
easy_xc8.mk
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
47
48
# **************************************************************************** #
# General Make configuration
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --warn-undefined-variables
.ONESHELL:
# select shell
ifeq ($(OS),Windows_NT)
SHELL = cmd
else
SHELL = bash
endif
# **************************************************************************** #
# Groundwork
# make sure the end user has told us the toolchain directory
ifndef TOOLCHAIN_DIR
$(error TOOLCHAIN_DIR is not set)
endif
# project settings are contained in PROJECT_FILE
PROJECT_FILE = project.yaml
# make sure PROJECT_FILE exists
ifeq (,$(wildcard ./$(PROJECT_FILE)))
$(warning $(PROJECT_FILE) does not exist! Run "make config" to create it.)
endif
# run configuration wizard
config: venv
$(VENV_PYTHON) $(TOOLCHAIN_DIR)/scripts/configure.py
# **************************************************************************** #
# include the other makefile pieces
# always include the venv helper file
include $(TOOLCHAIN_DIR)/makefiles/venv.mk
# only include the other makefiles if the PROJECT_FILE file exists
ifneq (,$(wildcard ./$(PROJECT_FILE)))
include $(TOOLCHAIN_DIR)/makefiles/variables.mk
include $(TOOLCHAIN_DIR)/makefiles/targets.mk
else
$(warning Makefile targets are disabled because $(PROJECT_FILE) doesn't exist!)
endif