1 vomp_platform=$(shell ./select-platform)
2 # vomp_platform variable sets up the build on different platforms
4 # mvp - cross compile for MVP
5 # raspberry - native compile for & on Raspberry Pi
6 # crossraspberry - cross compile for Raspberry Pi
7 # Override auto select here:
10 $(info Build system selected: $(vomp_platform))
13 # uncomment the line below if you want to build vomp application without a reboot option, automatically set for windows!
14 #vomp_options+= -DVOMP_HAS_EXIT
17 ifeq ($(vomp_platform),mvp)
18 include ../crosstool/cross-var
25 ifeq ($(vomp_platform),raspberry)
30 vomp_options += -DIPV6
34 # apt install g++-arm-linux-gnueabihf
35 # Set vomp_platform=crossraspberry above
36 ifeq ($(vomp_platform),crossraspberry)
37 CROSS_PREFIX=arm-linux-gnueabihf-
39 STRIP=$(CROSS_PREFIX)strip
40 CXX=$(CROSS_PREFIX)g++
45 CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -Wno-psabi -DDEV -D_GNU_SOURCE $(INCLUDES) $(vomp_options)
46 CXXFLAGS_REL = -O3 -Wall -Wshadow -D_GNU_SOURCE $(INCLUDES) $(vomp_options)
50 # This is the only thing windows and linux share
52 OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o
55 # Pictures for linux builds
56 PICTURES = -Wl,--format=binary
57 PICTURES += -Wl,other/vdrhires.png
58 PICTURES += -Wl,other/wallpaper720p.jpg
59 PICTURES += -Wl,other/properties.png
60 PICTURES += -Wl,other/radio.png
61 PICTURES += -Wl,other/timers.png
62 PICTURES += -Wl,other/tv.png
63 PICTURES += -Wl,other/recordings.png
64 PICTURES += -Wl,other/restart.png
65 PICTURES += -Wl,other/hd1080i.png
66 PICTURES += -Wl,other/hd720p.png
67 PICTURES += -Wl,other/sd576i.png
68 PICTURES += -Wl,other/txtoff.png
69 PICTURES += -Wl,other/txton.png
70 PICTURES += -Wl,other/dolbyoff.png
71 PICTURES += -Wl,other/dolbyon.png
72 PICTURES += -Wl,other/recording.png
73 PICTURES += -Wl,other/recfolder.png
74 PICTURES += -Wl,other/defposter.png
75 PICTURES += -Wl,--format=default
80 ifeq ($(vomp_platform),mvp)
81 LDFLAGS = -Wall -static
83 OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o \
84 surfacemvp.o fonts/helvB24.o fonts/helvB18.o wjpegcomplex.o vmedialist.o vcolourtuner.o \
85 audioplayer.o demuxeraudio.o \
86 vmediaview.o vvideomedia.o imagereader.o media.o mediaoptions.o mediaplayer.o serialize.o \
87 localmediafile.o playermedia.o demuxermedia.o mediafile.o osdvector.o surfacevector.o
89 CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a
90 INCLUDES = -I../jpeg/jpeg-6b -DVOMP_PLATTFORM_MVP
95 ifeq ($(vomp_platform),raspberry)
96 LDFLAGS = -Wall $(PICTURES)
97 LIBS = -L/opt/vc/lib -lpthread -lrt -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec -lavutil -lavresample
98 OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o signal.o
99 LIBS+= -ldl -lfontconfig -lfreetype -L/usr/lib/arm-linux-gnueabihf -lMagick++-6.Q16
101 INCLUDES = -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/usr/include/freetype2 -I/usr/include/ImageMagick -I/usr/include/ImageMagick-6 -I/usr/include/arm-linux-gnueabihf/ImageMagick-6
102 CXXFLAGS_DEV += -DVOMP_PLATTFORM_RASPBERRY -D__STDC_CONSTANT_MACROS
103 CXXFLAGS_REL += -DVOMP_PLATTFORM_RASPBERRY -D__STDC_CONSTANT_MACROS
108 ifeq ($(vomp_platform),crossraspberry)
109 LDFLAGS = -Wall $(PICTURES) --sysroot=/pi-root \
110 -Wl,-rpath-link,/pi-root/opt/vc/lib -Wl,-rpath-link,/pi-root/usr/lib/arm-linux-gnueabihf \
111 -L=/opt/vc/lib -L=/usr/lib/arm-linux-gnueabihf
112 LIBS = -lpthread -lstdc++ -lrt -lbrcmEGL -lbrcmOpenVG -lopenmaxil -lbcm_host -lavformat -lavcodec \
113 -lavutil -lavresample -lm -ldl -lfontconfig -lfreetype -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16
114 OBJECTS += main.o threadp.o osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o imageomx.o wjpegsimple.o remotelinux.o signal.o
116 INCLUDES = --sysroot=/pi-root -I=/usr/include/arm-linux-gnueabihf -I=/opt/vc/include -I=/usr/include/freetype2 -I=/usr/include/arm-linux-gnueabihf/ImageMagick-6 -I=/usr/include/ImageMagick-6
118 CXXFLAGS_DEV += -DVOMP_PLATTFORM_RASPBERRY -mtune=cortex-a7 -D__STDC_CONSTANT_MACROS -mfloat-abi=hard -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
119 CXXFLAGS_REL += -DVOMP_PLATTFORM_RASPBERRY -D__STDC_CONSTANT_MACROS -mfloat-abi=hard -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
124 .PHONY: clean fresh all install strip
129 vompclient: $(OBJECTS) $(TIOBJECT) $(CROSSLIBS)
130 $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) $(vomp_options) -o vompclient $(TIOBJECT) $(OBJECTS) $(CROSSLIBS) $(LIBS)
134 $(CC) $(CXXFLAGS_REL) -c -o ticonfig.o ticonfig.c
140 rm -f target-mvp/vompclient
141 cp vompclient target-mvp/vompclient
144 rm -f target-wmvp/vompclient
145 cp vompclient target-wmvp/vompclient
148 rm -f target-mvp-dev/vompclient
149 cp vompclient target-mvp-dev/vompclient
152 ../../gdb/gdb-7.12.1/gdb/gdb target-mvp/vompclient target-mvp/core.*
155 ../../gdb/gdb-7.12.1/gdb/gdb target-mvp-dev/vompclient target-mvp-dev/core.*
157 dev: CXXFLAGS := $(CXXFLAGS_DEV)
160 release: CXXFLAGS := $(CXXFLAGS_REL)
161 release: clean vompclient strip
164 rm -f *.o deps vompclient *~ fonts/*.o fonts/*~ teletxt/*.o
167 $(CC) -MM $(INCLUDES) $(OBJECTS:%.o=%.cc) > deps
169 ifneq ($(MAKECMDGOALS),clean)