From: Thomas Preud'homme Date: Wed, 30 Jan 2013 18:39:29 +0000 (+0100) Subject: Fix cross-compilation out-of-tree build X-Git-Tag: release_0_9_26~48 X-Git-Url: https://repo.or.cz/w/tinycc.git/commitdiff_plain/1b1e7ee1fd2f269872128dc5e8b830bd55dfa80c 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. --- diff --git a/Makefile b/Makefile index 080c80af..d6a0a28c 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\""