]> git.vomp.tv Git - vompclient-marten.git/blob - GNUmakefile
FFMPEG decoding in color at 7 fps
[vompclient-marten.git] / GNUmakefile
1 vomp_platform =raspberry\r
2 # valid platforms are raspberry and mvp\r
3 \r
4 ifeq ($(vomp_platform),mvp)\r
5 \r
6 $(info MVP crosscompiler)\r
7 include ../crosstool/cross-var\r
8 CC=$(CROSS)gcc\r
9 STRIP=$(CROSS)strip\r
10 CXX=$(CROSS)g++\r
11 LD=$(CROSS)g++\r
12 \r
13 endif\r
14 \r
15 ifeq ($(vomp_platform),raspberry)\r
16 \r
17 $(info raspberry normal compiler)\r
18 CC=gcc\r
19 STRIP=strip\r
20 CXX=g++\r
21 LD=g++\r
22 \r
23 endif\r
24 \r
25 \r
26 \r
27 CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES)\r
28 CXXFLAGS_REL = -O3 -Wall -Wshadow  -D_GNU_SOURCE $(INCLUDES)\r
29 \r
30 \r
31 LIBPATHS =\r
32 \r
33 \r
34 $(info Setting up objects)\r
35 # This is the only thing windows and linux share\r
36 include objects.mk\r
37 \r
38 OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o\r
39 \r
40 OBJECTS = $(OBJECTS1) \r
41 \r
42 \r
43 ifeq ($(vomp_platform),mvp)\r
44 $(info MVP flags)\r
45 LDFLAGS = -Wall -static\r
46 LIBS = -lpthread -lrt\r
47 \r
48 OBJECTS += main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o \r
49 TIOBJECT = ticonfig.o\r
50 CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a\r
51 INCLUDES = -I../jpeg/jpeg-6b -DVOMP_PLATTFORM_MVP\r
52 \r
53 endif\r
54 \r
55 ifeq ($(vomp_platform),raspberry)\r
56 $(info Raspberry pi flags)\r
57 LDFLAGS = -Wall\r
58 LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lGLESv2 -lopenmaxil -lbcm_host   -lavcodec -lavformat -lavutil\r
59 \r
60 OBJECTS += main.o threadp.o osdopengl.o surfaceopengl.o ledraspberry.o mtdraspberry.o videovpeogl.o audiovpe.o wjpegsimple.o remotelinux.o\r
61 LIBS+= -ljpeg\r
62 CROSSLIBS =\r
63 INCLUDES = -DVOMP_PLATTFORM_RASPBERRY   -I/opt/vc/include \r
64 \r
65 endif\r
66 \r
67 .PHONY: clean fresh all install strip\r
68 \r
69 default: dev\r
70 fresh:   clean default\r
71 \r
72 vompclient: $(OBJECTS) $(TIOBJECT) $(CROSSLIBS)\r
73         $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) -o vompclient $(TIOBJECT) $(OBJECTS) $(CROSSLIBS) $(LIBS)\r
74 \r
75 # A slight hash up\r
76 ticonfig.o:\r
77         $(CC) $(CXXFLAGS_REL) -c -o ticonfig.o ticonfig.c\r
78 \r
79 strip:\r
80         $(STRIP) vompclient\r
81 \r
82 install:\r
83         rm -f /mnt/auto/defiant/diskless/nfs/mvp/vompclient\r
84         cp vompclient /mnt/auto/defiant/diskless/nfs/mvp\r
85 \r
86 install-wmp:\r
87         rm -f /diskless/nfs/wmvp/vompclient\r
88         cp vompclient /diskless/nfs/wmvp\r
89 \r
90 install-dev:\r
91         rm -f /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient\r
92         cp vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev\r
93 \r
94 debug:\r
95         ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp/vompclient /mnt/auto/defiant/diskless/nfs/mvp/core.*\r
96 \r
97 debug2:\r
98         ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev/core.*\r
99 \r
100 dev: CXXFLAGS := $(CXXFLAGS_DEV)\r
101 dev: vompclient\r
102 \r
103 release: CXXFLAGS := $(CXXFLAGS_REL)\r
104 release: clean vompclient strip\r
105 \r
106 deps: GNUmakefile\r
107         $(CC) -MM $(INCLUDES) $(OBJECTS:%.o=%.cc) > deps\r
108 \r
109 -include deps\r
110 \r
111 clean:\r
112         rm -f *.o deps vompclient *~ fonts/*.o fonts/*~\r
113 \r