Fix stupid fucking bug with generating code
This commit is contained in:
parent
3f7d87ec0a
commit
1d56e5a865
|
@ -6,3 +6,9 @@ touchgfx_path := ../Middlewares/ST/touchgfx
|
|||
touchgfx_env := C:/TouchGFX/4.22.0/env
|
||||
# Optional additional compiler flags
|
||||
user_cflags := -DUSE_BPP=16 -std=gnu++1z -Wno-cast-qual -Wno-missing-declarations -Wno-format-truncation -Wno-unused-variable
|
||||
|
||||
# MINGW is annoying and for some reason replaces /z/path with z:/path in
|
||||
# ADDITIONAL_SOURCES. Since TouchGFXDesigner completely overwrites the generated
|
||||
# Makefile, we can't fix it there -- but the generated makefile includes this
|
||||
# file, so we can fix it here.
|
||||
ADDITIONAL_SOURCES := $(call subst_drivename,$(ADDITIONAL_SOURCES))
|
||||
|
|
|
@ -12,6 +12,12 @@ makefile_path := $(call qs,$(dir $(call sq,$(abspath $(call sq,$(makefile_name))
|
|||
|
||||
# Get path where the Application is
|
||||
application_path := $(call qs,$(abspath $(call sq,$(makefile_path)../..)))
|
||||
# Under Windows (MINGW32), the path is returned as e.g. z:/path/to/application
|
||||
# Since the path may show up as a target in the Makefile, we can't have a colon
|
||||
# in it. So we replace z:/ with /z/ to avoid this.
|
||||
subst_drivename = $(shell echo $(1) | sed -e 's!^\([a-zA-Z]\):/!/\1/!')
|
||||
export subst_drivename
|
||||
application_path := $(call subst_drivename,$(application_path))
|
||||
|
||||
.PHONY: clean assets all
|
||||
|
||||
|
@ -29,6 +35,7 @@ export ADDITIONAL_SOURCES ADDITIONAL_INCLUDE_PATHS ADDITIONAL_LIBRARY_PATHS ADDI
|
|||
all: $(filter assets,$(MAKECMDGOALS))
|
||||
all assets: $(filter clean,$(MAKECMDGOALS))
|
||||
all clean assets:
|
||||
@echo ADDITIONAL_SOURCES: $(ADDITIONAL_SOURCES)
|
||||
@$(MAKE) -r -f generated/simulator/gcc/Makefile -s $(MFLAGS) $@ -C "$(application_path)"
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue