On Sat, Jun 04, 2011 at 07:04:08PM +0100, Mans Rullgard wrote:
> This generates dependencies for the *-test.o files ensuring
> rebuilds when necessary.
> 
> --- a/subdir.mak
> +++ b/subdir.mak
> @@ -11,16 +11,19 @@ all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
>  
>  $(SUBDIR)%-test.o: $(SUBDIR)%-test.c
> -     $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
> +     $(CCDEP)
> +     $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
>  
>  $(SUBDIR)%-test.o: $(SUBDIR)%.c
> -     $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
> +     $(CCDEP)
> +     $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
>  
> +$(TESTOBJS): CPPFLAGS += -DTEST

I don't really see much advantage in adding -DTEST outside of the
commands for creating the object files, but I don't really care
either way...

> -$(OBJS) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += 
> -DHAVE_AV_CONFIG_H
> +$(OBJS) $(SUBDIR)%.ho $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H

That's slightly unrelated; should find a mention in the log message
at least IMO.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to