com32: add dependency on com32.ld -> *.elf syslinux-3.81-pre13
authorH. Peter Anvin <hpa@zytor.com>
Mon, 25 May 2009 22:43:10 +0000 (15:43 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 25 May 2009 22:43:10 +0000 (15:43 -0700)
All the *.elf files depend on com32.ld, so make that explicit.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/MCONFIG

index e02ec67..f8d9d97 100644 (file)
@@ -41,7 +41,8 @@ SFLAGS     = $(GCCOPT) -W -Wall -march=i386 \
             -nostdinc -iwithprefix include \
             -I$(com32)/libutil/include -I$(com32)/include $(GPLINCLUDE)
 
-LDFLAGS    = -m elf_i386 -T $(com32)/lib/com32.ld
+COM32LD           = $(com32)/lib/com32.ld
+LDFLAGS    = -m elf_i386 -T $(COM32LD)
 LIBGCC    := $(shell $(CC) $(GCCOPT) --print-libgcc)
 
 LNXCFLAGS  = -I$(com32)/libutil/include -W -Wall -O -g -D_GNU_SOURCE
@@ -63,8 +64,8 @@ C_LNXLIBS  = $(com32)/libutil/libutil_lnx.a
        $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
 
 .PRECIOUS: %.elf
-%.elf: %.o $(LIBS) $(C_LIBS)
-       $(LD) $(LDFLAGS) -o $@ $^
+%.elf: %.o $(LIBS) $(C_LIBS) $(COM32LD)
+       $(LD) $(LDFLAGS) -o $@ $(filter-out $(COM32LD),$^)
 
 .PRECIOUS: %.lo
 %.lo: %.S