[dvblast-devel] Makefile: Add support for cross compilation by setting CROSS variable.

Georgi Chorbadzhiyski git at videolan.org
Fri Aug 24 00:13:39 CEST 2012


dvblast | branch: master | Georgi Chorbadzhiyski <gf at unixsol.org> | Thu Aug 23 20:59:16 2012 +0300| [03fb4e47af69e0cc130678eee160ed3e55aecd19] | committer: Georgi Chorbadzhiyski

Makefile: Add support for cross compilation by setting CROSS variable.

Cross compiling is now as easy as running `make CROSS=sh4-linux-`
if your compiler is in the PATH and it is named sh4-linux-cc.

> http://git.videolan.org/gitweb.cgi/dvblast.git/?a=commit;h=03fb4e47af69e0cc130678eee160ed3e55aecd19
---

 Makefile |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 8f3901c..fdac634 100644
--- a/Makefile
+++ b/Makefile
@@ -37,15 +37,15 @@ all: dvblast dvblastctl
 
 %.o: %.c Makefile dvblast.h en50221.h comm.h asi.h mrtg-cnt.h
 	@echo "CC      $<"
-	$(Q)$(CC) $(CFLAGS) -c $<
+	$(Q)$(CROSS)$(CC) $(CFLAGS) -c $<
 
 dvblast: $(OBJ_DVBLAST)
 	@echo "LINK    $@"
-	$(Q)$(CC) -o $@ $(OBJ_DVBLAST) $(LDLIBS_DVBLAST) $(LDLIBS)
+	$(Q)$(CROSS)$(CC) -o $@ $(OBJ_DVBLAST) $(LDLIBS_DVBLAST) $(LDLIBS)
 
 dvblastctl: $(OBJ_DVBLASTCTL)
 	@echo "LINK    $@"
-	$(Q)$(CC) -o $@ $(OBJ_DVBLASTCTL) $(LDLIBS_DVBLAST) $(LDLIBS)
+	$(Q)$(CROSS)$(CC) -o $@ $(OBJ_DVBLASTCTL) $(LDLIBS_DVBLAST) $(LDLIBS)
 
 clean:
 	@echo "CLEAN   $(CLEAN_OBJS)"



More information about the dvblast-devel mailing list