Statistics
| Branch: | Revision:

chunker-player / chunker_player / Makefile @ 46c4acca

History | View | Annotate | Download (3.48 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
ifdef PSNR_PUBLICATION
61
CPPFLAGS += -DPSNR_PUBLICATION
62
LOCAL_PSNR_CPPFLAGS = -I$(LIBEVENT_DIR)/include
63
LOCAL_PSNR_LDLIBS = $(NAPA)/rep/librep.a $(NAPA)/dclog/libdclog.a $(NAPA)/common/libcommon.a $(NAPA)/ml/libml.a $(LIBEVENT_DIR)/lib/libevent.a
64
endif
65

    
66
#put them in the correct order
67
CPPFLAGS += $(LOCAL_SDLTTF_CPPFLAGS) $(LOCAL_SDLIMAGE_CPPFLAGS) $(LOCAL_SDL_CPPFLAGS)
68
CPPFLAGS += $(LOCAL_MHD_CPPFLAGS) $(LOCAL_CONFUSE_CPPFLAGS) $(LOCAL_FREETYPE_CPPFLAGS)
69
CPPFLAGS += $(LOCAL_FFMPEG_CPPFLAGS) $(LOCAL_COMMON_CPPFLAGS)
70
CPPFLAGS += $(LOCAL_PSNR_CPPFLAGS)
71

    
72
LDFLAGS += $(LOCAL_SDLTTF_LDFLAGS) $(LOCAL_SDLIMAGE_LDFLAGS) $(LOCAL_SDL_LDFLAGS)
73
LDFLAGS += $(LOCAL_MHD_LDFLAGS) $(LOCAL_CONFUSE_LDFLAGS) $(LOCAL_FREETYPE_LDFLAGS)
74
LDFLAGS += $(LOCAL_FFMPEG_LDFLAGS) $(LOCAL_COMMON_LDFLAGS)
75

    
76
LDLIBS += $(LOCAL_SDLTTF_LDLIBS) $(LOCAL_SDLIMAGE_LDLIBS) $(LOCAL_SDL_LDLIBS)
77
LDLIBS += $(LOCAL_MHD_LDLIBS) $(LOCAL_CONFUSE_LDLIBS) $(LOCAL_FREETYPE_LDLIBS)
78
LDLIBS += $(LOCAL_FFMPEG_LDLIBS) $(LOCAL_COMMON_LDLIBS)
79
LDLIBS += $(LOCAL_PSNR_LDLIBS)
80

    
81
ifdef WINDOWS
82
LDLIBS += $(DYNAMIC_LDLIBS) -lmingw32 $(LOCAL_ABS_SDL)/lib/libSDLmain.a $(LOCAL_ABS_SDL)/lib/libSDL.a -lwinmm -lgdi32
83
else
84
LDLIBS += $(DYNAMIC_LDLIBS) -lrt
85
endif
86

    
87
LINKER = $(CC)
88

    
89
all: $(OUTPUTFILE)
90

    
91
OBJS = ../chunk_transcoding/external_chunk_transcoding.o
92
ifeq ($(IO), httpevent)
93
#TODO add: or equals httpmhd
94
OBJS += http_chunk_puller.o
95
endif
96

    
97
ifeq ($(IO), tcp)
98
OBJS += tcp_chunk_puller.o
99
endif
100
OBJS += chunker_player.o QoE_Estimator.o player_stats.o player_core.o player_gui.o
101

    
102
$(OUTPUTFILE): $(OBJS)
103
	$(LINKER) $(LDFLAGS) $^ $(LDLIBS) -o $@
104

    
105
clean:
106
	rm -f $(OUTPUTFILE)
107
	rm -f *.o