From 1902ee519d9aa87ff23d9b5917c0fdc3bd617be7 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sat, 18 May 2013 16:54:24 +0100 Subject: [PATCH] Some progress towards using cross compiler --- GNUmakefile | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 0a547df..435d644 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,46 +1,48 @@ -# valid platforms are raspberry and mvp +# valid platforms are mvp, raspberry and crossraspberry vomp_platform=$(shell ./select-platform) +#vomp_platform=crossraspberry $(info selected $(vomp_platform)) vomp_options= -#uncomment the line below, if you want to vomp application like, without a reboot option, automatically set for windows! +# uncomment the line below if you want to build vomp application without a reboot option, automatically set for windows! #vomp_options+= -DVOMP_HAS_EXIT -ifeq ($(vomp_platform),mvp) + +ifeq ($(vomp_platform),mvp) $(info MVP crosscompiler) include ../crosstool/cross-var CC=$(CROSS)gcc STRIP=$(CROSS)strip CXX=$(CROSS)g++ LD=$(CROSS)g++ - endif ifeq ($(vomp_platform),raspberry) - $(info raspberry normal compiler) CC=gcc STRIP=strip CXX=g++ LD=g++ - endif +ifeq ($(vomp_platform),crossraspberry) +$(info raspberry 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 +endif CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES) $(vomp_options) CXXFLAGS_REL = -O3 -Wall -Wshadow -D_GNU_SOURCE $(INCLUDES) $(vomp_options) - - LIBPATHS = $(info Setting up objects) # This is the only thing windows and linux share include objects.mk - OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o - OBJECTS = $(OBJECTS1) @@ -53,10 +55,9 @@ OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audi TIOBJECT = ticonfig.o CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a INCLUDES = -I../jpeg/jpeg-6b -DVOMP_PLATTFORM_MVP - - endif + ifeq ($(vomp_platform),raspberry) $(info Raspberry pi flags) LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default @@ -68,7 +69,20 @@ CROSSLIBS = INCLUDES = -DVOMP_PLATTFORM_RASPBERRY -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/usr/include/freetype2 -I/usr/include/ImageMagick CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS +endif + + +ifeq ($(vomp_platform),crossraspberry) +$(info Raspberry pi flags cross compiler) +LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default -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 +LIBS = -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 -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -ldl -lfontconfig +OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o wjpegsimple.o remotelinux.o +LIBS+= -lfreetype -lMagick++ +CROSSLIBS = +INCLUDES = -DVOMP_PLATTFORM_RASPBERRY -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 +CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS -mfloat-abi=hard +CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS -mfloat-abi=hard endif .PHONY: clean fresh all install strip -- 2.39.5