[FFmpeg-devel] [PATCHv2] Makefile: generate stripped CLI tools directly instead of copying unstripped ones first
Marton Balint
cus at passwd.hu
Mon Oct 9 23:30:31 EEST 2017
On Sat, 7 Oct 2017, Marton Balint wrote:
> Now works with --disable-stripping.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> Makefile | 4 ++++
> configure | 4 ++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 4a1253a052..642651d4cc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -97,8 +97,12 @@ include $(SRC_PATH)/doc/examples/Makefile
> libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
>
> $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
> +ifeq ($(STRIPTYPE),direct)
> + $(STRIP) -o $@ $<
> +else
> $(CP) $< $@
> $(STRIP) $@
> +endif
>
> %$(PROGSSUF)_g$(EXESUF): $(FF_DEP_LIBS)
> $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
> diff --git a/configure b/configure
> index 391c141e7a..3b685b0d24 100755
> --- a/configure
> +++ b/configure
> @@ -3361,6 +3361,7 @@ x86asmexe_default="nasm"
> windres_default="windres"
> nvcc_default="nvcc"
> nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2"
> +striptype="direct"
>
> # OS
> target_os_default=$(tolower $(uname -s))
> @@ -5087,6 +5088,7 @@ case $target_os in
> ;;
> os/2*)
> strip="lxlite -CS"
> + striptype=""
> objformat="aout"
> add_cppflags -D_GNU_SOURCE
> add_ldflags -Zomf -Zbin-files -Zargs-wild -Zhigh-mem -Zmap
> @@ -6824,6 +6826,7 @@ fi # test "$quiet" != "yes"
> test -e Makefile || echo "include $source_path/Makefile" > Makefile
>
> enabled stripping || strip="echo skipping strip"
> +enabled stripping || striptype=""
>
> config_files="$TMPH ffbuild/config.mak doc/config.texi"
>
> @@ -6867,6 +6870,7 @@ ARFLAGS=$arflags
> AR_O=$ar_o
> RANLIB=$ranlib
> STRIP=$strip
> +STRIPTYPE=$striptype
> NVCC=$nvcc
> CP=cp -p
> LN_S=$ln_s
> --
Will apply this tomorrow.
Regards,
Marton
More information about the ffmpeg-devel
mailing list