From 3e3cd2d697f5e072c1bd42754b0c8de55d445966 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Thu, 30 Jan 2020 15:12:04 +0000 Subject: [PATCH] Cross compiling... So close --- GNUmakefile | 20 +++++++++++--------- select-platform | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index a82057c..ac92b67 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -12,6 +12,8 @@ $(info selected $(vomp_platform)) # uncomment the line below if you want to build vomp application without a reboot option, automatically set for windows! #vomp_options+= -DVOMP_HAS_EXIT +CROSSROOT= + ifndef VERBOSE Q = @ endif @@ -58,17 +60,17 @@ endif ifeq ($(vomp_platform),crossraspberry) $(info Raspberry Pi cross compiler) -CC=arm-linux-gnueabi-gcc-4.7 -STRIP=arm-linux-gnueabi-strip -CXX=arm-linux-gnueabi-g++-4.7 -LD=arm-linux-gnueabi-g++-4.7 -LDFLAGS = $(PICTURES) -Wl,--verbose -Xlinker --rpath-link=rpi-root/usr/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/lib/arm-linux-gnueabihf -Xlinker --rpath-link=rpi-root/opt/vc/lib -LIBPATHS = -Lrpi-root/opt/vc/lib -Lrpi-root/lib -Lrpi-root/usr/lib -Lrpi-root/lib/arm-linux-gnueabihf -Lrpi-root/usr/lib/arm-linux-gnueabihf -Lrpi-root/usr/local/lib -LIBS = -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample -ldl -lfontconfig -LIBS += -lfreetype -lMagick++-6.Q16 +CC=arm-linux-gnueabihf-gcc +STRIP=arm-linux-gnueabihf-strip +CXX=arm-linux-gnueabihf-g++ +LD=arm-linux-gnueabihf-g++ +LDFLAGS = $(PICTURES) -Xlinker --sysroot=$(CROSSROOT) -Xlinker --rpath-link=$(CROSSROOT)/usr/lib/gcc/arm-linux-gnueabihf/8 -Xlinker --rpath-link=$(CROSSROOT)/usr/lib/arm-linux-gnueabihf -Xlinker --rpath-link=$(CROSSROOT)/lib/arm-linux-gnueabihf -Xlinker --rpath-link=$(CROSSROOT)/opt/vc/lib +LIBPATHS = -L$(CROSSROOT)/usr/lib/gcc/arm-linux-gnueabihf/8 -L$(CROSSROOT)/opt/vc/lib -L$(CROSSROOT)/lib -L$(CROSSROOT)/usr/lib -L$(CROSSROOT)/lib/arm-linux-gnueabihf -L$(CROSSROOT)/usr/lib/arm-linux-gnueabihf -L$(CROSSROOT)/usr/local/lib +LIBS = -lpthread -lrt -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample +LIBS += -ldl -lfontconfig -lfreetype -lMagick++-6.Q16 -lm OBJECTS = $(OBJ_COMMON) $(OBJ_RASPBERRY) CROSSLIBS = -INCLUDES = -Irpi-root/opt/vc/include -Irpi-root/opt/vc/include/interface/vcos/pthreads -Irpi-root/usr/include -Irpi-root/usr/include/freetype2 -Irpi-root/usr/include/ImageMagick-6 -Irpi-root/usr/include/ImageMagick -Irpi-root/usr/include/arm-linux-gnueabihf/ImageMagick-6 +INCLUDES = -I$(CROSSROOT)/opt/vc/include -I$(CROSSROOT)/opt/vc/include/interface/vcos/pthreads -I$(CROSSROOT)/usr/include -I$(CROSSROOT)/usr/include/arm-linux-gnueabihf -I$(CROSSROOT)/usr/include/freetype2 -I$(CROSSROOT)/usr/include/ImageMagick-6 -I$(CROSSROOT)/usr/include/ImageMagick -I$(CROSSROOT)/usr/include/arm-linux-gnueabihf/ImageMagick-6 PLATFORM = -DVOMP_PLATFORM_RASPBERRY CXXFLAGS_EXTRA = -mfloat-abi=hard endif diff --git a/select-platform b/select-platform index de8d02d..8051559 100755 --- a/select-platform +++ b/select-platform @@ -7,5 +7,5 @@ elif grep -q BCM2709 /proc/cpuinfo ; then elif grep -q BCM2835 /proc/cpuinfo ; then echo "raspberry" else - echo "" + echo "crossraspberry" fi -- 2.39.5