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