Fix building with relative path to object directory outside the source tree
[coreboot.git] / Makefile.inc
index 2bd7b725e23fdd4dc393bed7ca8318d51a2070a0..76bfc262f2fd2e7453e275470a6de03343aec66d 100644 (file)
@@ -179,7 +179,7 @@ $(objutil)/%.o: $(objutil)/%.c
        @printf "    HOSTCC     $(subst $(objutil)/,,$(@))\n"
        $(HOSTCC) -MMD -I$(subst $(objutil)/,util/,$(dir $<)) -I$(dir $<) $(HOSTCFLAGS) -c -o $@ $<
 
-$(obj)/%.ramstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
+$(abspath $(obj))/%.ramstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H)
        @printf "    CC         $(subst $(obj)/,,$(@))\n"
        $(CC) -MMD $(CFLAGS) -c -o $@ $<