Skip to content

Commit d440ed8

Browse files
committed
lib/Makefile: fix out-of-tree build of lib/bt-exe.c
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.
1 parent a522213 commit d440ed8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ $(TOP)/%.o : %.c $(TCC)
9292
$S$(XCC) -c $< -o $@ $(XFLAGS)
9393

9494
$(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)
9697

9798
$(X)crt1w.o : crt1.c
9899
$(X)wincrt1w.o : wincrt1.c

0 commit comments

Comments
 (0)