OSDN Git Service

Merge commit '535a742c2695a9e0c586b50d7fa76e318232ff24'
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>
Mon, 27 Jun 2016 15:51:57 +0000 (17:51 +0200)
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>
Mon, 27 Jun 2016 15:56:47 +0000 (17:56 +0200)
* commit '535a742c2695a9e0c586b50d7fa76e318232ff24':
  build: Change structure of the linker version script templates

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
1  2 
common.mak
libavcodec/libavcodec.v
libavdevice/libavdevice.v
libavformat/libavformat.v
libpostproc/libpostproc.v
libswresample/libswresample.v

diff --cc common.mak
  # first so "all" becomes default target
  all: all-yes
  
-       $(M)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ | sed -e 's/:/:\
- /' -e 's/; /;\
- /g' > $@
 +DEFAULT_YASMD=.dbg
 +
 +ifeq ($(DBG),1)
 +YASMD=$(DEFAULT_YASMD)
 +else
 +YASMD=
 +endif
 +
 +ifndef SUBDIR
 +
 +ifndef V
 +Q      = @
 +ECHO   = printf "$(1)\t%s\n" $(2)
 +BRIEF  = CC CXX OBJCC HOSTCC HOSTLD AS YASM AR LD STRIP CP WINDRES
 +SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM
 +
 +MSG    = $@
 +M      = @$(call ECHO,$(TAG),$@);
 +$(foreach VAR,$(BRIEF), \
 +    $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 +$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
 +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
 +endif
 +
 +ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample
 +
 +# NASM requires -I path terminated with /
 +IFLAGS     := -I. -I$(SRC_LINK)/
 +CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
 +CFLAGS     += $(ECFLAGS)
 +CCFLAGS     = $(CPPFLAGS) $(CFLAGS)
 +OBJCFLAGS  += $(EOBJCFLAGS)
 +OBJCCFLAGS  = $(CPPFLAGS) $(CFLAGS) $(OBJCFLAGS)
 +ASFLAGS    := $(CPPFLAGS) $(ASFLAGS)
 +CXXFLAGS   := $(CPPFLAGS) $(CFLAGS) $(CXXFLAGS)
 +YASMFLAGS  += $(IFLAGS:%=%/) -Pconfig.asm
 +
 +HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS)
 +LDFLAGS    := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
 +
 +define COMPILE
 +       $(call $(1)DEP,$(1))
 +       $($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
 +endef
 +
 +COMPILE_C = $(call COMPILE,CC)
 +COMPILE_CXX = $(call COMPILE,CXX)
 +COMPILE_S = $(call COMPILE,AS)
 +COMPILE_M = $(call COMPILE,OBJCC)
 +COMPILE_HOSTC = $(call COMPILE,HOSTCC)
 +
 +%.o: %.c
 +      $(COMPILE_C)
 +
 +%.o: %.cpp
 +      $(COMPILE_CXX)
 +
 +%.o: %.m
 +      $(COMPILE_M)
 +
 +%.s: %.c
 +      $(CC) $(CCFLAGS) -S -o $@ $<
 +
 +%.o: %.S
 +      $(COMPILE_S)
 +
 +%_host.o: %.c
 +      $(COMPILE_HOSTC)
 +
 +%.o: %.rc
 +      $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
 +
 +%.i: %.c
 +      $(CC) $(CCFLAGS) $(CC_E) $<
 +
 +%.h.c:
 +      $(Q)echo '#include "$*.h"' >$@
 +
 +%.ver: %.v
++      $(M)sed 's/MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
 +
 +%.c %.h %.ver: TAG = GEN
 +
 +# Dummy rule to stop make trying to rebuild removed or renamed headers
 +%.h:
 +      @:
 +
 +# Disable suffix rules.  Most of the builtin rules are suffix rules,
 +# so this saves some time on slow systems.
 +.SUFFIXES:
 +
 +# Do not delete intermediate files from chains of implicit rules
 +$(OBJS):
 +endif
 +
  include $(SRC_PATH)/arch.mak
  
  OBJS      += $(OBJS-yes)
@@@ -1,7 -1,6 +1,9 @@@
- LIBAVCODEC_$MAJOR {
-         global: av*;
-                 #deprecated, remove after next bump
-                 audio_resample;
-                 audio_resample_close;
-         local:  *;
+ LIBAVCODEC_MAJOR {
+     global:
+         av*;
++        #deprecated, remove after next bump
++        audio_resample;
++        audio_resample_close;
+     local:
+         *;
  };
@@@ -1,4 -1,6 +1,7 @@@
- LIBAVDEVICE_$MAJOR {
-         global: avdevice_*; av_*;
-         local: *;
+ LIBAVDEVICE_MAJOR {
+     global:
+         avdevice_*;
++        av_*;
+     local:
+         *;
  };
@@@ -1,17 -1,6 +1,19 @@@
- LIBAVFORMAT_$MAJOR {
-         global: av*;
-                 #FIXME those are for ffserver
-                 ff_inet_aton;
-                 ff_socket_nonblock;
-                 ff_rtsp_parse_line;
-                 ff_rtp_get_local_rtp_port;
-                 ff_rtp_get_local_rtcp_port;
-                 ffio_open_dyn_packet_buf;
-                 ffio_set_buf_size;
-                 ffurl_close;
-                 ffurl_open;
-                 ffurl_write;
-                 #those are deprecated, remove on next bump
-                 url_feof;
-         local: *;
+ LIBAVFORMAT_MAJOR {
+     global:
+         av*;
++        #FIXME those are for ffserver
++        ff_inet_aton;
++        ff_socket_nonblock;
++        ff_rtsp_parse_line;
++        ff_rtp_get_local_rtp_port;
++        ff_rtp_get_local_rtcp_port;
++        ffio_open_dyn_packet_buf;
++        ffio_set_buf_size;
++        ffurl_close;
++        ffurl_open;
++        ffurl_write;
++        #those are deprecated, remove on next bump
++        url_feof;
+     local:
+         *;
  };
index e65d76f,0000000..27381c6
mode 100644,000000..100644
--- /dev/null
@@@ -1,4 -1,0 +1,7 @@@
- LIBPOSTPROC_$MAJOR {
-         global: postproc_*; pp_*;
-         local: *;
++LIBPOSTPROC_MAJOR {
++    global:
++        postproc_*;
++        pp_*;
++    local:
++        *;
 +};
index 0d5efe4,0000000..3b3508d
mode 100644,000000..100644
--- /dev/null
@@@ -1,4 -1,0 +1,7 @@@
- LIBSWRESAMPLE_$MAJOR {
-         global: swr_*; swresample_*;
-         local: *;
++LIBSWRESAMPLE_MAJOR {
++    global:
++        swr_*;
++        swresample_*;
++    local:
++        *;
 +};