Statistics
| Branch: | Revision:

chunker-player / chunker_player / Makefile @ e11386c0

History | View | Annotate | Download (3.11 KB)

1 1538a3bd GiuseppeTropea
include ../common.mak
2
3 e11386c0 CsabaKiraly
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 1538a3bd GiuseppeTropea
#SDL config here
18 14d0fa53 GiuseppeTropea
LOCAL_SDL_CPPFLAGS = -I$(LOCAL_ABS_SDL)/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
19 e11386c0 CsabaKiraly
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 14d0fa53 GiuseppeTropea
33
LOCAL_SDLIMAGE_CPPFLAGS = -I$(LOCAL_SDLIMAGE)/include/SDL
34 e11386c0 CsabaKiraly
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 14d0fa53 GiuseppeTropea
40
LOCAL_FREETYPE_CPPFLAGS = -I$(LOCAL_FREETYPE)/include/ -I$(LOCAL_FREETYPE)/include/freetype2
41 e11386c0 CsabaKiraly
LOCAL_FREETYPE_LDFLAGS = -Wl,-rpath -Wl,$(LOCAL_FREETYPE)/lib
42
#LOCAL_FREETYPE_LDFLAGS = -Wl,$(LOCAL_FREETYPE)/lib
43 920851bb GiuseppeTropea
LOCAL_FREETYPE_LDLIBS = $(LOCAL_FREETYPE)/lib/libfreetype.a
44 14d0fa53 GiuseppeTropea
45
LOCAL_SDLTTF_CPPFLAGS = -I$(LOCAL_SDLTTF)/include/SDL
46
LOCAL_SDLTTF_LDLIBS = $(LOCAL_SDLTTF)/lib/libSDL_ttf.a
47 1538a3bd GiuseppeTropea
48
#microhttpd config here
49 bf59a05f GiuseppeTropea
LOCAL_MHD_CPPFLAGS = -I$(LOCAL_MHD)/include
50 e11386c0 CsabaKiraly
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 bf59a05f GiuseppeTropea
LOCAL_MHD_LDLIBS = $(LOCAL_MHD)/lib/libmicrohttpd.a
54 e11386c0 CsabaKiraly
endif
55 1538a3bd GiuseppeTropea
56 78068e21 GiuseppeTropea
LOCAL_CONFUSE_CPPFLAGS = -I$(LOCAL_CONFUSE)/include
57
LOCAL_CONFUSE_LDLIBS = $(LOCAL_CONFUSE)/lib/libconfuse.a
58
59 c3ccd8f0 GiuseppeTropea
#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 e11386c0 CsabaKiraly
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 c3ccd8f0 GiuseppeTropea
LDLIBS += $(DYNAMIC_LDLIBS)
76 e11386c0 CsabaKiraly
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 1538a3bd GiuseppeTropea
87 e11386c0 CsabaKiraly
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 1538a3bd GiuseppeTropea
92 e11386c0 CsabaKiraly
$(OUTPUTFILE): $(OBJS)
93
	$(LINKER) $(LDFLAGS) $^ $(LDLIBS) -o $@
94 1538a3bd GiuseppeTropea
95
clean:
96 e11386c0 CsabaKiraly
	rm -f $(OUTPUTFILE)
97 1538a3bd GiuseppeTropea
	rm -f *.o