From: Andre Noll Date: Wed, 17 Jun 2020 17:24:53 +0000 (+0200) Subject: build: Make sure osl.h exists when we run the compiler. X-Git-Tag: v0.2.0~5^2~4 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=ad6b4c7b6ec3de735eb17d29a2b67b5ecfb19be0;p=osl.git build: Make sure osl.h exists when we run the compiler. This fixes the build on NetBSD 9.0_RC1. --- 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) $<