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