aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-01-30 19:39:29 +0100
committerThomas Preud'homme <robotux@celest.fr>2013-01-30 19:39:29 +0100
commit1b1e7ee1fd2f269872128dc5e8b830bd55dfa80c (patch)
treeec54d27fc97970fa893dff4463bc540cec540d3e
parent913cd6270bb68857f366787efef344ba08188071 (diff)
downloadtinycc-1b1e7ee1fd2f269872128dc5e8b830bd55dfa80c.tar.gz
tinycc-1b1e7ee1fd2f269872128dc5e8b830bd55dfa80c.tar.bz2
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.
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 080c80a..d6a0a28 100644
--- a/Makefile
+++ b/Makefile
@@ -170,8 +170,8 @@ tcc$(EXESUF): tcc.o $(LIBTCC)
$(CC) -o $@ $^ $(LIBS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LINK_LIBTCC)
# Cross Tiny C Compilers
-%-tcc$(EXESUF):
- $(CC) -o $@ tcc.c -DONE_SOURCE $(DEFINES) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)
+%-tcc$(EXESUF): tcc.c
+ $(CC) -o $@ $< -DONE_SOURCE $(DEFINES) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)
$(I386_CROSS): DEFINES = -DTCC_TARGET_I386 \
-DCONFIG_TCCDIR="\"$(tccdir)/i386\""