X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=Makefile;fp=Makefile;h=d0427c6aef05d21b7752832c6ae282268d9f90f4;hb=ad6b4c7b6ec3de735eb17d29a2b67b5ecfb19be0;hp=aa0e6f6d06c704008292e077bd21bf9e18a43180;hpb=c283f067d330a9288aec5510836cd4a898dd07df;p=osl.git diff --git a/Makefile b/Makefile index aa0e6f6..d0427c6 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,10 @@ shared: $(realname) ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) endif -%.o: %.c Makefile errtab.h + +# List osl.h in the prerequisites to make sure we generate it before attempting +# to run the compiler. This matters only when the .d file does not exist. +%.o: %.c osl.h Makefile errtab.h $(CC) $(OSL_CPPFLAGS) $(CPPFLAGS) \ -c -MMD -MF $(*F).d -MT $@ \ $(OSL_CFLAGS) $(CFLAGS) $<