]> git.vomp.tv Git - vompclient-marten.git/blob - GNUmakefile
Compilation fixes
[vompclient-marten.git] / GNUmakefile
1 include ../crosstool/cross-var
2
3 CC=$(CROSS)gcc
4 STRIP=$(CROSS)strip
5 CXX=$(CROSS)g++
6 LD=$(CROSS)g++
7
8 INCLUDES = -I../jpeg/jpeg-6b
9 CXXFLAGS_DEV = -g -O0 -Wall -Wshadow -DDEV -D_GNU_SOURCE $(INCLUDES)
10 CXXFLAGS_REL = -O3 -Wall -Wshadow  -D_GNU_SOURCE $(INCLUDES)
11 LDFLAGS = -Wall -static
12
13 LIBPATHS =
14 LIBS = -lpthread -lrt
15 CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a
16
17 # This is the only thing windows and linux share
18 include objects.mk
19
20 OBJECTSMVP = main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o
21 OBJECTSWIN = threadwin.o remotewin.o ledwin.o mtdwin.o videowin.o audiowin.o osdwin.o surfacewin.o
22
23 OBJECTS = $(OBJECTS1) $(OBJECTSMVP)
24
25 .PHONY: clean fresh all install strip
26
27 default: dev
28 fresh:   clean default
29
30 vompclient: $(OBJECTS) ticonfig.o $(CROSSLIBS)
31         $(LD) $(LDFLAGS) $(LIBPATHS) $(RELEASE) -o vompclient ticonfig.o $(OBJECTS) $(CROSSLIBS) $(LIBS)
32
33 # A slight hash up
34 ticonfig.o:
35         $(CC) $(CXXFLAGS_REL) -c -o ticonfig.o ticonfig.c
36
37 strip:
38         $(STRIP) vompclient
39
40 install:
41         rm -f /mnt/auto/defiant/diskless/nfs/mvp/vompclient
42         cp vompclient /mnt/auto/defiant/diskless/nfs/mvp
43
44 install-wmp:
45         rm -f /diskless/nfs/wmvp/vompclient
46         cp vompclient /diskless/nfs/wmvp
47
48 install-dev:
49         rm -f /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient
50         cp vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev
51
52 debug:
53         ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp/vompclient /mnt/auto/defiant/diskless/nfs/mvp/core.*
54
55 debug2:
56         ../../gdb/gdb-6.7/gdb/gdb /mnt/auto/defiant/diskless/nfs/mvp-dev/vompclient /mnt/auto/defiant/diskless/nfs/mvp-dev/core.*
57
58 dev: CXXFLAGS := $(CXXFLAGS_DEV)
59 dev: vompclient
60
61 release: CXXFLAGS := $(CXXFLAGS_REL)
62 release: clean vompclient strip
63
64 deps: GNUmakefile
65         $(CC) -MM $(INCLUDES) $(OBJECTS:%.o=%.cc) > deps
66
67 -include deps
68
69 clean:
70         rm -f *.o deps vompclient *~ fonts/*.o fonts/*~
71