Revision 684b28e0

View differences:

Makefile
65 65
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
66 66

  
67 67
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
68
	$(CC) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
68
	$(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
69 69

  
70 70
tools/%$(EXESUF): tools/%.c
71
	$(CC) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
71
	$(LD) $(CFLAGS) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
72 72

  
73 73
ffplay.o ffplay.d: CFLAGS += $(SDL_CFLAGS)
74 74

  
......
304 304
tests/%$(HOSTEXESUF): tests/%.c
305 305
	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
306 306

  
307
tests/seek_test$(EXESUF): tests/seek_test.c $(FF_DEP_LIBS)
308
	$(CC) $(FF_LDFLAGS) $(CFLAGS) -o $@ $< $(FF_EXTRALIBS)
307
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
308
	$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
309 309

  
310 310

  
311 311
.PHONY: documentation *test regtest-* zlib-error alltools check config
configure
190 190
  echo "  --nm=NM                  use nm tool"
191 191
  echo "  --as=AS                  use assembler AS [$as_default]"
192 192
  echo "  --cc=CC                  use C compiler CC [$cc_default]"
193
  echo "  --ld=LD                  use linker LD"
193 194
  echo "  --host-cc=HOSTCC         use host C compiler HOSTCC"
194 195
  echo "  --host-cflags=HCFLAGS    use HCFLAGS when compiling for host"
195 196
  echo "  --host-ldflags=HLDFLAGS  use HLDFLAGS when linking for host"
......
579 580
    for f; do
580 581
        test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
581 582
    done
582
    check_cmd $cc $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
583
    check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
583 584
}
584 585

  
585 586
check_cppflags(){
......
1000 1001
    host_ldflags
1001 1002
    host_libs
1002 1003
    host_os
1004
    ld
1003 1005
    logfile
1004 1006
    nm
1005 1007
    source_path
......
1485 1487

  
1486 1488
test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
1487 1489

  
1488
set_default as
1490
: ${ld_default:=$cc}
1491
set_default as ld
1489 1492

  
1490 1493
if test -n "$sysroot"; then
1491 1494
    case "$cc_type" in
......
2476 2479
echo "BUILD_ROOT=\"$PWD\"" >> config.mak
2477 2480
echo "CC=$cc" >> config.mak
2478 2481
echo "AS=$as" >> config.mak
2482
echo "LD=$ld" >> config.mak
2479 2483
echo "YASM=$yasmexe" >> config.mak
2480 2484
echo "AR=$ar" >> config.mak
2481 2485
echo "RANLIB=$ranlib" >> config.mak
subdir.mak
22 22

  
23 23
define RULES
24 24
$(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
25
	$(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
25
	$(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
26 26

  
27 27
$(SUBDIR)%-test.o: $(SUBDIR)%.c
28 28
	$(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
......
54 54

  
55 55
$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS)
56 56
	$(SLIB_CREATE_DEF_CMD)
57
	$(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
57
	$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
58 58
	$(SLIB_EXTRA_CMD)
59 59

  
60 60
ifdef SUBDIR

Also available in: Unified diff