Statistics
| Branch: | Revision:

chunker-player / chunker_player / Makefile @ e11386c0

History | View | Annotate | Download (3.11 KB)

1
include ../common.mak
2

    
3
ifdef WINDOWS
4
OUTPUTFILE = chunker_player.exe
5
else
6
OUTPUTFILE = chunker_player
7
endif
8

    
9
ifeq ($(IO), httpevent)
10
CPPFLAGS += -DHTTPIO
11
endif
12

    
13
ifeq ($(IO), tcp)
14
CPPFLAGS += -DTCPIO
15
endif
16

    
17
#SDL config here
18
LOCAL_SDL_CPPFLAGS = -I$(LOCAL_ABS_SDL)/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
19
ifdef MAC_OS
20
#force static linking to .a SDL libraries
21
LOCAL_SDL_LDFLAGS =  -framework OpenGL $(LOCAL_ABS_SDL)/lib/libSDLmain.a $(LOCAL_ABS_SDL)/lib/libSDL.a  -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit
22
else
23
LOCAL_SDL_LDFLAGS = -L$(LOCAL_ABS_SDL)/lib  
24
endif
25
ifndef WINDOWS
26
ifdef MAC_OS
27
LOCAL_SDL_LDLIBS =
28
else
29
LOCAL_SDL_LDLIBS = $(LOCAL_ABS_SDL)/lib/libSDL.a  -ldl $(LOCAL_ABS_SDL)/lib/libSDLmain.a
30
endif
31
endif
32

    
33
LOCAL_SDLIMAGE_CPPFLAGS = -I$(LOCAL_SDLIMAGE)/include/SDL
34
ifdef WINDOWS
35
LOCAL_SDLIMAGE_LDLIBS = $(LOCAL_SDLIMAGE)/lib/libSDL_image.a $(LOCAL_LIBPNG)/lib/libpng.a $(LOCAL_LIBINTL)/lib/libintl.*.a $(LOCAL_LIBICONV)/lib/libiconv.a
36
else
37
LOCAL_SDLIMAGE_LDLIBS = $(LOCAL_SDLIMAGE)/lib/libSDL_image.a $(LOCAL_LIBPNG)/lib/libpng.a
38
endif
39

    
40
LOCAL_FREETYPE_CPPFLAGS = -I$(LOCAL_FREETYPE)/include/ -I$(LOCAL_FREETYPE)/include/freetype2
41
LOCAL_FREETYPE_LDFLAGS = -Wl,-rpath -Wl,$(LOCAL_FREETYPE)/lib
42
#LOCAL_FREETYPE_LDFLAGS = -Wl,$(LOCAL_FREETYPE)/lib
43
LOCAL_FREETYPE_LDLIBS = $(LOCAL_FREETYPE)/lib/libfreetype.a
44

    
45
LOCAL_SDLTTF_CPPFLAGS = -I$(LOCAL_SDLTTF)/include/SDL
46
LOCAL_SDLTTF_LDLIBS = $(LOCAL_SDLTTF)/lib/libSDL_ttf.a
47

    
48
#microhttpd config here
49
LOCAL_MHD_CPPFLAGS = -I$(LOCAL_MHD)/include
50
ifdef WINDOWS
51
LOCAL_MHD_LDLIBS = $(LOCAL_MHD)/lib/libmicrohttpd.a $(LOCAL_PLIBC)/lib/libplibc.dll.a $(LOCAL_PTHREAD)/lib/libpthread.a
52
else
53
LOCAL_MHD_LDLIBS = $(LOCAL_MHD)/lib/libmicrohttpd.a
54
endif
55

    
56
LOCAL_CONFUSE_CPPFLAGS = -I$(LOCAL_CONFUSE)/include
57
LOCAL_CONFUSE_LDLIBS = $(LOCAL_CONFUSE)/lib/libconfuse.a
58

    
59
#put them in the correct order
60
CPPFLAGS += $(LOCAL_SDLTTF_CPPFLAGS) $(LOCAL_SDLIMAGE_CPPFLAGS) $(LOCAL_SDL_CPPFLAGS)
61
CPPFLAGS += $(LOCAL_MHD_CPPFLAGS) $(LOCAL_CONFUSE_CPPFLAGS) $(LOCAL_FREETYPE_CPPFLAGS)
62
CPPFLAGS += $(LOCAL_FFMPEG_CPPFLAGS) $(LOCAL_COMMON_CPPFLAGS)
63

    
64
LDFLAGS += $(LOCAL_SDLTTF_LDFLAGS) $(LOCAL_SDLIMAGE_LDFLAGS) $(LOCAL_SDL_LDFLAGS)
65
LDFLAGS += $(LOCAL_MHD_LDFLAGS) $(LOCAL_CONFUSE_LDFLAGS) $(LOCAL_FREETYPE_LDFLAGS)
66
LDFLAGS += $(LOCAL_FFMPEG_LDFLAGS) $(LOCAL_COMMON_LDFLAGS)
67

    
68
LDLIBS += $(LOCAL_SDLTTF_LDLIBS) $(LOCAL_SDLIMAGE_LDLIBS) $(LOCAL_SDL_LDLIBS)
69
LDLIBS += $(LOCAL_MHD_LDLIBS) $(LOCAL_CONFUSE_LDLIBS) $(LOCAL_FREETYPE_LDLIBS)
70
LDLIBS += $(LOCAL_FFMPEG_LDLIBS) $(LOCAL_COMMON_LDLIBS)
71

    
72
ifdef WINDOWS
73
LDLIBS += $(DYNAMIC_LDLIBS) -lmingw32 $(LOCAL_ABS_SDL)/lib/libSDLmain.a $(LOCAL_ABS_SDL)/lib/libSDL.dll.a -lwinmm -lgdi32
74
else
75
LDLIBS += $(DYNAMIC_LDLIBS)
76
endif
77

    
78
LINKER = $(CC)
79

    
80
all: $(OUTPUTFILE)
81

    
82
OBJS = ../chunk_transcoding/external_chunk_transcoding.o
83
ifeq ($(IO), httpevent)
84
OBJS += http_chunk_puller.o
85
endif
86

    
87
ifeq ($(IO), tcp)
88
OBJS += tcp_chunk_puller.o
89
endif
90
OBJS += chunker_player.o QoE_Estimator.o player_stats.o player_core.o player_gui.o
91

    
92
$(OUTPUTFILE): $(OBJS)
93
	$(LINKER) $(LDFLAGS) $^ $(LDLIBS) -o $@
94

    
95
clean:
96
	rm -f $(OUTPUTFILE)
97
	rm -f *.o