Commit a522213 ("tccpe.c: never assume static...") removed the global -I$(TOP) for cleaner lib build, and ensured that it is added for bcheck.c as it now includes config.h, but forgot that bt-exe.c also needs config.h, as it includes ../tccrun.c which includes it. Also, the explicit tccrun.c prerequisite for bt-exe.c is not required, as all *.o lib files depend on $(TCC), which depends on libtcc, which depends on tccrun.c . Also, at win32/built-tcc.bat, while bcheck.c needs -I.. for config.h, bt-exe.c doesn't, as ../tccrun.c does find it where it expects it.
Showing the changes to lib (1 of 1 file). Show all
Unified · Split
| @@ -92,7 +92,8 @@ $(TOP)/%.o : %.c $(TCC) · 91 unmodified lines | ||
| 92 | 92 | $S$(XCC) -c $< -o $@ $(XFLAGS) |
| 93 | 93 | |
| 94 | 94 | $(TOP)/bcheck.o : XFLAGS += $(BFLAGS) -I$(TOP) |
| 95 | −$(TOP)/bt-exe.o : $(TOP)/tccrun.c | |
| 95 | +# includes tccrun.c, $(TOP) for config.h (tccrun.c prerequisite via $(TCC)) | |
| 96 | +$(TOP)/bt-exe.o : XFLAGS += -I$(TOP) | |
| 96 | 97 | |
| 97 | 98 | $(X)crt1w.o : crt1.c |
| 98 | 99 | $(X)wincrt1w.o : wincrt1.c |