]> git.vomp.tv Git - vompclient.git/blob - GNUmakefile
Add led patch by dingo35
[vompclient.git] / GNUmakefile
1 # valid platforms are raspberry and mvp
2 vomp_platform=$(shell ./select-platform)
3 $(info selected $(vomp_platform))
4
5 vomp_options=
6 #uncomment the line below, if you want to vomp application like, without a reboot option, automatically set for windows!
7 #vomp_options+= -DVOMP_HAS_EXIT
8 ifeq ($(vomp_platform),mvp)
9
10 $(info MVP crosscompiler)
11 include ../crosstool/cross-var
12 CC=$(CROSS)gcc
13 STRIP=$(CROSS)strip
14 CXX=$(CROSS)g++
15 LD=$(CROSS)g++
16
17 endif
18
19 ifeq ($(vomp_platform),raspberry)
20
21 $(info raspberry normal compiler)
22 CC=gcc
23 STRIP=strip
24 CXX=g++
25 LD=g++
26
27 endif
28
29
30
31 CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES) $(vomp_options)
32 CXXFLAGS_REL = -O3 -Wall -Wshadow  -D_GNU_SOURCE $(INCLUDES) $(vomp_options)
33
34
35 LIBPATHS =
36
37
38 $(info Setting up objects)
39 # This is the only thing windows and linux share
40 include objects.mk
41
42 OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o
43
44 OBJECTS = $(OBJECTS1) 
45
46
47 ifeq ($(vomp_platform),mvp)
48 $(info MVP flags)
49 LDFLAGS = -Wall -static
50 LIBS = -lpthread -lrt
51
52 OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o wjpegcomplex.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o 
53 TIOBJECT = ticonfig.o
54 CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a
55 INCLUDES = -I../jpeg/jpeg-6b  -DVOMP_PLATTFORM_MVP 
56
57
58 endif
59
60 ifeq ($(vomp_platform),raspberry)
61 $(info Raspberry pi flags)
62 LDFLAGS = -Wall -Wl,--format=binary -Wl,other/vdrhires.jpg -Wl,other/wallpaper720p.jpg -Wl,--format=default 
63 LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lOpenVG -lopenmaxil -lbcm_host   -lavformat -lavcodec -lavutil
64
65 OBJECTS += main.o threadp.o  osdvector.o surfacevector.o osdopenvg.o ledraspberry.o mtdraspberry.o videoomx.o audioomx.o wjpegsimple.o remotelinux.o  
66 LIBS+=  -lfreetype -lMagick++ 
67 CROSSLIBS = 
68 INCLUDES = -DVOMP_PLATTFORM_RASPBERRY   -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads  -I/usr/include/freetype2 -I/usr/include/ImageMagick
69 CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS
70 CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS
71
72 endif
73
74 .PHONY: clean fresh all install strip
75
76 default: dev
77 fresh:   clean default
78
79 vompclient: $(OBJECTS) $(TIOBJECT) $(CROSSLIBS)
80         $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) $(vomp_options) -o vompclient $(TIOBJECT) $(OBJECTS) $(CROSSLIBS) $(LIBS)
81
82 # A slight hash up
83 ticonfig.o:
84         $(CC) $(CXXFLAGS_REL) -c -o ticonfig.o ticonfig.c
85
86 strip:
87         $(STRIP) vompclient
88
89 install:
90         rm -f target-mvp/vompclient
91         cp vompclient target-mvp/vompclient
92
93 install-wmp:
94         rm -f target-wmvp/vompclient
95         cp vompclient target-wmvp/vompclient
96
97 install-dev:
98         rm -f target-mvp-dev/vompclient
99         cp vompclient target-mvp-dev/vompclient
100
101 debug:
102         ../../gdb/gdb-6.7/gdb/gdb target-mvp/vompclient target-mvp/core.*
103
104 debug2:
105         ../../gdb/gdb-6.7/gdb/gdb target-mvp-dev/vompclient target-mvp-dev/core.*
106
107 dev: CXXFLAGS := $(CXXFLAGS_DEV)
108 dev: vompclient
109
110 release: CXXFLAGS := $(CXXFLAGS_REL)
111 release: clean vompclient strip
112
113 deps: GNUmakefile
114         $(CC) -MM $(INCLUDES)  $(OBJECTS:%.o=%.cc) > deps
115
116 -include deps
117
118 clean:
119         rm -f *.o deps vompclient *~ fonts/*.o fonts/*~ teletxt/*.o
120