History

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.

Avi Halachmi (:avih) committed 1 year ago

Commit d440ed81 parent a5222131 file · +2 −1Browse files

Unified · Split

lib/Makefile+2−1
@@ -92,7 +92,8 @@ $(TOP)/%.o : %.c $(TCC) · 91 unmodified lines
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t