]> git.vomp.tv Git - vompclient-marten.git/blob - GNUmakefile
Motion Compensation, all implemented, all buggy
[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 mediafile.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 \r
54 endif\r
55 \r
56 ifeq ($(vomp_platform),raspberry)\r
57 $(info Raspberry pi flags)\r
58 LDFLAGS = -Wall\r
59 LIBS = -L/opt/vc/lib -lpthread -lrt -lEGL -lGLESv2 -lopenmaxil -lbcm_host   -lavcodec -lavformat -lavutil\r
60 \r
61 OBJECTS += main.o threadp.o osdopengl.o surfaceopengl.o ledraspberry.o mtdraspberry.o videovpeogl.o audiovpe.o wjpegsimple.o remotelinux.o glshader.o glosdshader.o glyuv400shader.o glyuv444shader.o  glmocoshader.o\r
62 LIBS+= -ljpeg\r
63 CROSSLIBS =\r
64 INCLUDES = -DVOMP_PLATTFORM_RASPBERRY   -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads \r
65 CXXFLAGS_DEV += -D__STDC_CONSTANT_MACROS\r
66 CXXFLAGS_REL += -D__STDC_CONSTANT_MACROS\r
67 \r
68 endif\r
69 \r
70 .PHONY: clean fresh all install strip\r
71 \r
72 default: dev\r
73 fresh:   clean default\r
74 \r
75 vompclient: $(OBJECTS) $(TIOBJECT) $(CROSSLIBS)\r
76         $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) -o vompclient $(TIOBJECT) $(OBJECTS) $(CROSSLIBS) $(LIBS)\r
77 \r
78 # A slight hash up\r
79 ticonfig.o:\r
80         $(CC) $(CXXFLAGS_REL) -c -o ticonfig.o ticonfig.c\r
81 \r
82 strip:\r
83         $(STRIP) vompclient\r
84 \r
85 install:\r
86         rm -f /mnt/auto/defiant/diskless/nfs/mvp/vompclient\r
87         cp vompclient /mnt/auto/defiant/diskless/nfs/mvp\r
88 \r
89 install-wmp:\r
90         rm -f /diskless/nfs/wmvp/vompclient\r
91         cp vompclient /diskless/nfs/wmvp\r
92 \r
93 install-dev:\r
94         rm -f /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient\r
95         cp vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev\r
96 \r
97 debug:\r
98         ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp/vompclient /mnt/auto/defiant/diskless/nfs/mvp/core.*\r
99 \r
100 debug2:\r
101         ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev/core.*\r
102 \r
103 dev: CXXFLAGS := $(CXXFLAGS_DEV)\r
104 dev: vompclient\r
105 \r
106 release: CXXFLAGS := $(CXXFLAGS_REL)\r
107 release: clean vompclient strip\r
108 \r
109 deps: GNUmakefile\r
110         $(CC) -MM $(INCLUDES) $(OBJECTS:%.o=%.cc) > deps\r
111 \r
112 -include deps\r
113 \r
114 clean:\r
115         rm -f *.o deps vompclient *~ fonts/*.o fonts/*~\r
116 \r