Revision b1ca9642

View differences:

Makefile
10 10
PROGS-$(CONFIG_FFSERVER) += ffserver
11 11

  
12 12
PROGS      := $(PROGS-yes:%=%$(EXESUF))
13
PROGS_G     = $(PROGS-yes:%=%_g$(EXESUF))
13 14
OBJS        = $(PROGS-yes:%=%.o) cmdutils.o
14 15
MANPAGES    = $(PROGS-yes:%=doc/%.1)
15 16
PODPAGES    = $(PROGS-yes:%=doc/%.pod)
......
20 21

  
21 22
BASENAMES   = ffmpeg ffplay ffprobe ffserver
22 23
ALLPROGS    = $(BASENAMES:%=%$(EXESUF))
24
ALLPROGS_G  = $(BASENAMES:%=%_g$(EXESUF))
23 25
ALLMANPAGES = $(BASENAMES:%=%.1)
24 26

  
25 27
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
......
51 53

  
52 54
all: $(FF_DEP_LIBS) $(PROGS) $(ALL_TARGETS-yes)
53 55

  
56
$(PROGS): %$(EXESUF): %_g$(EXESUF)
57
	$(CP) $< $@
58
	$(STRIP) $@
59

  
54 60
config.h: .config
55 61
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
56 62
	@-tput bold 2>/dev/null
......
74 80

  
75 81
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
76 82

  
77
ffplay$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
78
ffserver$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
83
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
84
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
79 85

  
80
%$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
86
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
81 87
	$(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
82 88

  
83 89
tools/%$(EXESUF): tools/%.o
......
159 165
	$(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
160 166

  
161 167
clean:: testclean
162
	$(RM) $(ALLPROGS)
168
	$(RM) $(ALLPROGS) $(ALLPROGS_G)
163 169
	$(RM) $(CLEANSUFFIXES)
164 170
	$(RM) doc/*.html doc/*.pod doc/*.1
165 171
	$(RM) $(TOOLS)
common.mak
21 21
ifndef V
22 22
Q      = @
23 23
ECHO   = printf "$(1)\t%s\n" $(2)
24
BRIEF  = CC AS YASM AR LD HOSTCC
24
BRIEF  = CC AS YASM AR LD HOSTCC STRIP CP
25 25
SILENT = DEPCC YASMDEP RM RANLIB
26 26
MSG    = $@
27 27
M      = @$(call ECHO,$(TAG),$@);
configure
243 243
  --enable-debug=LEVEL     set the debug level [$debuglevel]
244 244
  --disable-optimizations  disable compiler optimizations
245 245
  --enable-extra-warnings  enable more compiler warnings
246
  --disable-stripping      disable stripping of executables and shared libraries
246 247
  --samples=PATH           location of test samples for FATE, if not set use
247 248
                           \$FATE_SAMPLES at make invocation time.
248 249

  
......
1146 1147
    extra_warnings
1147 1148
    logging
1148 1149
    optimizations
1150
    stripping
1149 1151
    symver
1150 1152
    yasm
1151 1153
"
......
1183 1185
    pkg_config
1184 1186
    samples
1185 1187
    source_path
1188
    strip
1186 1189
    sysinclude
1187 1190
    sysroot
1188 1191
    target_exec
......
1622 1625
objformat="elf"
1623 1626
pkg_config_default=pkg-config
1624 1627
ranlib="ranlib"
1628
strip_default="strip"
1625 1629
yasmexe="yasm"
1626 1630
nogas=":"
1627 1631

  
......
1654 1658
enable optimizations
1655 1659
enable protocols
1656 1660
enable static
1661
enable stripping
1657 1662
enable swscale
1658 1663
enable swscale_alpha
1659 1664

  
......
1830 1835
nm_default="${cross_prefix}${nm_default}"
1831 1836
pkg_config_default="${cross_prefix}${pkg_config_default}"
1832 1837
ranlib="${cross_prefix}${ranlib}"
1838
strip_default="${cross_prefix}${strip_default}"
1833 1839

  
1834 1840
sysinclude_default="${sysroot}/usr/include"
1835 1841

  
1836
set_default cc nm pkg_config sysinclude
1842
set_default cc nm pkg_config strip sysinclude
1837 1843
enabled cross_compile || host_cc_default=$cc
1838 1844
set_default host_cc
1839 1845

  
......
2392 2398
        ;;
2393 2399
    bsd/os)
2394 2400
        add_extralibs -lpoll -lgnugetopt
2401
        strip="strip -d"
2395 2402
        ;;
2396 2403
    darwin)
2397 2404
        enable malloc_aligned
......
2399 2406
        enabled ppc && add_asflags -force_cpusubtype_ALL
2400 2407
        SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
2401 2408
        enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
2409
        strip="${strip} -x"
2402 2410
        add_ldflags -Wl,-dynamic,-search_paths_first
2403 2411
        SLIBSUF=".dylib"
2404 2412
        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
......
2468 2476
        ranlib="echo ignoring ranlib"
2469 2477
        ;;
2470 2478
    os/2*)
2479
        strip="lxlite -CS"
2471 2480
        ln_s="cp -f"
2472 2481
        add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
2473 2482
        SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
......
3129 3138
    echo "VIS enabled               ${vis-no}"
3130 3139
fi
3131 3140
echo "debug symbols             ${debug-no}"
3141
echo "strip symbols             ${stripping-no}"
3132 3142
echo "optimizations             ${optimizations-no}"
3133 3143
echo "static                    ${static-no}"
3134 3144
echo "shared                    ${shared-no}"
......
3224 3234
    map 'test -f "$source_path/$v" && $ln_s "$source_path/$v" $v' $FILES
3225 3235
fi
3226 3236

  
3237
enabled stripping || strip="echo skipping strip"
3238

  
3227 3239
config_files="$TMPH config.mak"
3228 3240

  
3229 3241
cat > config.mak <<EOF
......
3251 3263
YASMDEP=$yasmexe
3252 3264
AR=$ar
3253 3265
RANLIB=$ranlib
3266
CP=cp -p
3254 3267
LN_S=$ln_s
3268
STRIP=$strip
3255 3269
CPPFLAGS=$CPPFLAGS
3256 3270
CFLAGS=$CFLAGS
3257 3271
ASFLAGS=$ASFLAGS
subdir.mak
60 60
install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
61 61
	$(Q)mkdir -p "$(SHLIBDIR)"
62 62
	$$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
63
	$$(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
63 64
	$(Q)cd "$(SHLIBDIR)" && \
64 65
		$(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
65 66
	$(Q)cd "$(SHLIBDIR)" && \

Also available in: Unified diff