Skip to content

Commit d8976a5

Browse files
authored
Merge pull request SHA2017-badge#141 from SHA2017-badge/basvs-makefile
Makefile improvements
2 parents ff6b560 + 50a99b8 commit d8976a5

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

esp32/Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
ifndef PROJECT_PATH
2+
PROJECT_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))/../..)
3+
export PROJECT_PATH
4+
endif
5+
6+
ifndef IDF_PATH
7+
IDF_PATH := $(PROJECT_PATH)/esp-idf
8+
export IDF_PATH
9+
endif
10+
111
include ../py/mkenv.mk
212

313
# qstr definitions (must come before including py.mk)
@@ -23,13 +33,9 @@ FLASH_SIZE ?= 16MB
2333
CROSS_COMPILE ?= xtensa-esp32-elf-
2434

2535
# paths to ESP IDF and its components
26-
ifeq ($(IDF_PATH),)
27-
$(error Please configure the ESPIDF variable)
28-
endif
2936
ESPIDF = $(IDF_PATH)
3037
ESPCOMP = $(ESPIDF)/components
3138
ESPTOOL ?= $(ESPCOMP)/esptool_py/esptool/esptool.py
32-
BADGE = $(IDF_PATH)/..
3339

3440
# verify the ESP IDF version
3541
ESPIDF_SUPHASH := 8b274cd5a5d193a82b49aef384c303b105eda700
@@ -658,7 +664,7 @@ OBJ_ESPIDF += $(addprefix $(BUILD)/, $(ESPIDF_SDMMC_O))
658664
# Badge magic
659665

660666
$(BUILD)/components/%.o:
661-
BADGE_COMPONENTS_O = $(addprefix $(BADGE)/components/,\
667+
BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\
662668
badge/badge_base.o \
663669
badge/badge_eink.o \
664670
badge/badge_i2c.o \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy