diff --git a/build/make/Makefile b/build/make/Makefile index 64d3c934b..a951e99bc 100755 --- a/build/make/Makefile +++ b/build/make/Makefile @@ -98,11 +98,11 @@ install:: $(BUILD_PFX)%.c.d: %.c $(if $(quiet),@echo " [DEP] $@") $(qexec)mkdir -p $(dir $@) - $(qexec)$(CC) $(CFLAGS) -M $< | $(fmt_deps) > $@ + $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -M $< | $(fmt_deps) > $@ $(BUILD_PFX)%.c.o: %.c $(if $(quiet),@echo " [CC] $@") - $(qexec)$(CC) $(CFLAGS) -c -o $@ $< + $(qexec)$(CC) $(INTERNAL_CFLAGS) $(CFLAGS) -c -o $@ $< $(BUILD_PFX)%.asm.d: %.asm $(if $(quiet),@echo " [DEP] $@") @@ -188,7 +188,7 @@ define linker_template $(1): $(filter-out -%,$(2)) $(1): $(if $(quiet),@echo " [LD] $$@") - $(qexec)$$(LD) $$(strip $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) + $(qexec)$$(LD) $$(strip $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -o $$@ $(2) $(3) $$(extralibs)) endef # make-3.80 has a bug with expanding large input strings to the eval function, # which was triggered in some cases by the following component of diff --git a/examples.mk b/examples.mk index 89c93db62..3e34b5697 100644 --- a/examples.mk +++ b/examples.mk @@ -122,8 +122,8 @@ else LIB_PATH := $(call enabled,LIB_PATH) INC_PATH := $(call enabled,INC_PATH) endif -CFLAGS += $(addprefix -I,$(INC_PATH)) -LDFLAGS += $(addprefix -L,$(LIB_PATH)) +INTERNAL_CFLAGS = $(addprefix -I,$(INC_PATH)) +INTERNAL_LDFLAGS += $(addprefix -L,$(LIB_PATH)) # Expand list of selected examples to build (as specified above) @@ -214,7 +214,8 @@ $(1): $($(1:.vcproj=).SRCS) --ver=$$(CONFIG_VS_VERSION)\ --proj-guid=$$($$(@:.vcproj=).GUID)\ $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \ - --out=$$@ $$(CFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) -lwinmm $$^ + --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \ + $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) -lwinmm $$^ endef PROJECTS-$(CONFIG_MSVS) += $(ALL_EXAMPLES:.c=.vcproj) INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\