Statistics
| Branch: | Revision:

chunker-player / chunker_player / Makefile @ 59e008ed

History | View | Annotate | Download (3.34 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
#TODO add: or equals httpmhd
11
CPPFLAGS += -DHTTPIO
12
endif
13

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

    
18
#SDL config here
19
LOCAL_SDL_CPPFLAGS = -I$(LOCAL_ABS_SDL)/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
20
ifdef MAC_OS
21
#force static linking to .a SDL libraries
22
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
23
else
24
LOCAL_SDL_LDFLAGS = -L$(LOCAL_ABS_SDL)/lib  
25
endif
26
ifndef WINDOWS
27
ifdef MAC_OS
28
LOCAL_SDL_LDLIBS =
29
else
30
LOCAL_SDL_LDLIBS = $(LOCAL_ABS_SDL)/lib/libSDL.a  -ldl $(LOCAL_ABS_SDL)/lib/libSDLmain.a
31
endif
32
endif
33

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

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

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

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

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

    
60
LOCAL_PSNR_LDLIBS = $(NAPA)/rep/librep.a $(NAPA)/dclog/libdclog.a $(NAPA)/common/libcommon.a $(NAPA)/ml/libml.a $(LIBEVENT_DIR)/lib/libevent.a
61

    
62
#put them in the correct order
63
CPPFLAGS += $(LOCAL_SDLTTF_CPPFLAGS) $(LOCAL_SDLIMAGE_CPPFLAGS) $(LOCAL_SDL_CPPFLAGS)
64
CPPFLAGS += $(LOCAL_MHD_CPPFLAGS) $(LOCAL_CONFUSE_CPPFLAGS) $(LOCAL_FREETYPE_CPPFLAGS)
65
CPPFLAGS += $(LOCAL_FFMPEG_CPPFLAGS) $(LOCAL_COMMON_CPPFLAGS)
66

    
67
LDFLAGS += $(LOCAL_SDLTTF_LDFLAGS) $(LOCAL_SDLIMAGE_LDFLAGS) $(LOCAL_SDL_LDFLAGS)
68
LDFLAGS += $(LOCAL_MHD_LDFLAGS) $(LOCAL_CONFUSE_LDFLAGS) $(LOCAL_FREETYPE_LDFLAGS)
69
LDFLAGS += $(LOCAL_FFMPEG_LDFLAGS) $(LOCAL_COMMON_LDFLAGS)
70

    
71
LDLIBS += $(LOCAL_SDLTTF_LDLIBS) $(LOCAL_SDLIMAGE_LDLIBS) $(LOCAL_SDL_LDLIBS)
72
LDLIBS += $(LOCAL_MHD_LDLIBS) $(LOCAL_CONFUSE_LDLIBS) $(LOCAL_FREETYPE_LDLIBS)
73
LDLIBS += $(LOCAL_FFMPEG_LDLIBS) $(LOCAL_COMMON_LDLIBS)
74
LDLIBS += $(LOCAL_PSNR_LDLIBS)
75

    
76
ifdef WINDOWS
77
LDLIBS += $(DYNAMIC_LDLIBS) -lmingw32 $(LOCAL_ABS_SDL)/lib/libSDLmain.a $(LOCAL_ABS_SDL)/lib/libSDL.dll.a -lwinmm -lgdi32
78
else
79
LDLIBS += $(DYNAMIC_LDLIBS) -lrt
80
endif
81

    
82
LINKER = $(CC)
83

    
84
all: $(OUTPUTFILE)
85

    
86
OBJS = ../chunk_transcoding/external_chunk_transcoding.o
87
ifeq ($(IO), httpevent)
88
#TODO add: or equals httpmhd
89
OBJS += http_chunk_puller.o
90
endif
91

    
92
ifeq ($(IO), tcp)
93
OBJS += tcp_chunk_puller.o
94
endif
95
OBJS += chunker_player.o QoE_Estimator.o player_stats.o player_core.o player_gui.o
96

    
97
$(OUTPUTFILE): $(OBJS)
98
	$(LINKER) $(LDFLAGS) $^ $(LDLIBS) -o $@
99

    
100
clean:
101
	rm -f $(OUTPUTFILE)
102
	rm -f *.o