History

Fix cross-compilation out-of-tree build

Add tcc.c as a prerequesite of the %-tcc$(EXESUF) target and compile $< instead of tcc.c to make sure tcc.c is search in directories specified by VPATH.

Thomas Preud'homme committed 13 years ago

Commit 1b1e7ee1 parent 913cd621 file · +2 −2Browse files

Unified · Split

Makefile+2−2
@@ -170,8 +170,8 @@ tcc$(EXESUF): tcc.o $(LIBTCC) · 169 unmodified lines
170 $(CC) -o $@ $^ $(LIBS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LINK_LIBTCC)170 $(CC) -o $@ $^ $(LIBS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LINK_LIBTCC)
171 171
172# Cross Tiny C Compilers172# Cross Tiny C Compilers
173%-tcc$(EXESUF):173%-tcc$(EXESUF): tcc.c
174 $(CC) -o $@ tcc.c -DONE_SOURCE $(DEFINES) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)174 $(CC) -o $@ $< -DONE_SOURCE $(DEFINES) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)
175 175
176$(I386_CROSS): DEFINES = -DTCC_TARGET_I386 \176$(I386_CROSS): DEFINES = -DTCC_TARGET_I386 \
177 -DCONFIG_TCCDIR="\"$(tccdir)/i386\""177 -DCONFIG_TCCDIR="\"$(tccdir)/i386\""

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