diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-01-25 01:42:23 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-01-25 20:43:34 +0100 |
commit | b46aae093634271931395d65f422f4b2a23112d3 (patch) | |
tree | 1f7118bfbb0fb1ba4fcbf7caba4caaf9988630b1 /common.mak | |
parent | 8b02af1e6fbb0d782f3561afd82f66edc7fa8ae0 (diff) | |
download | ffmpeg-b46aae093634271931395d65f422f4b2a23112d3.tar.gz |
build: use a link instead of changing current directory when compiling
If links don't work, fall back to using the full source path as was
previously done.
This should fix build failures with MSVC.
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'common.mak')
-rw-r--r-- | common.mak | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common.mak b/common.mak index 3812149ef5..03b51c5968 100644 --- a/common.mak +++ b/common.mak @@ -32,7 +32,7 @@ endif ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample # NASM requires -I path terminated with / -IFLAGS := -I$(DST_PATH)/ -I$(SRC_PATH)/ +IFLAGS := -I. -I$(SRC_LINK)/ CPPFLAGS := $(IFLAGS) $(CPPFLAGS) CFLAGS += $(ECFLAGS) CCFLAGS = $(CPPFLAGS) $(CFLAGS) @@ -43,12 +43,11 @@ CXXFLAGS += $(CPPFLAGS) $(CFLAGS) YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) -LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)$(DST_PATH)/lib%) $(LDFLAGS) +LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS) define COMPILE $(call $(1)DEP,$(1)) - $(Q)cd $(SRC_PATH); if [ -n "$(findstring $(SRC_PATH),$<)" ]; then dest=$(subst $(SRC_PATH)/,,$<); else dest=$(DST_PATH)/$<; fi; \ - $(subst @,,$($(1))) $($(1)FLAGS) $($(1)_DEPFLAGS:$(@:.o=.d)=$(DST_PATH)/$(@:.o=.d)) $($(1)_C) $($(1)_O:$@=$(DST_PATH)/$@) $$dest + $($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) endef COMPILE_C = $(call COMPILE,CC) |