Statistics
| Branch: | Revision:

chunker-player / chunker_player / Makefile @ 59e008ed

History | View | Annotate | Download (3.34 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 59e008ed GiuseppeTropea
#TODO add: or equals httpmhd
11 e11386c0 CsabaKiraly
CPPFLAGS += -DHTTPIO
12
endif
13
14
ifeq ($(IO), tcp)
15
CPPFLAGS += -DTCPIO
16
endif
17
18 1538a3bd GiuseppeTropea
#SDL config here
19 14d0fa53 GiuseppeTropea
LOCAL_SDL_CPPFLAGS = -I$(LOCAL_ABS_SDL)/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
20 e11386c0 CsabaKiraly
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 14d0fa53 GiuseppeTropea
34
LOCAL_SDLIMAGE_CPPFLAGS = -I$(LOCAL_SDLIMAGE)/include/SDL
35 e11386c0 CsabaKiraly
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 14d0fa53 GiuseppeTropea
41
LOCAL_FREETYPE_CPPFLAGS = -I$(LOCAL_FREETYPE)/include/ -I$(LOCAL_FREETYPE)/include/freetype2
42 e11386c0 CsabaKiraly
LOCAL_FREETYPE_LDFLAGS = -Wl,-rpath -Wl,$(LOCAL_FREETYPE)/lib
43
#LOCAL_FREETYPE_LDFLAGS = -Wl,$(LOCAL_FREETYPE)/lib
44 920851bb GiuseppeTropea
LOCAL_FREETYPE_LDLIBS = $(LOCAL_FREETYPE)/lib/libfreetype.a
45 14d0fa53 GiuseppeTropea
46
LOCAL_SDLTTF_CPPFLAGS = -I$(LOCAL_SDLTTF)/include/SDL
47
LOCAL_SDLTTF_LDLIBS = $(LOCAL_SDLTTF)/lib/libSDL_ttf.a
48 1538a3bd GiuseppeTropea
49
#microhttpd config here
50 bf59a05f GiuseppeTropea
LOCAL_MHD_CPPFLAGS = -I$(LOCAL_MHD)/include
51 e11386c0 CsabaKiraly
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 bf59a05f GiuseppeTropea
LOCAL_MHD_LDLIBS = $(LOCAL_MHD)/lib/libmicrohttpd.a
55 e11386c0 CsabaKiraly
endif
56 1538a3bd GiuseppeTropea
57 78068e21 GiuseppeTropea
LOCAL_CONFUSE_CPPFLAGS = -I$(LOCAL_CONFUSE)/include
58
LOCAL_CONFUSE_LDLIBS = $(LOCAL_CONFUSE)/lib/libconfuse.a
59
60 59e008ed GiuseppeTropea
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 b0e46569 GiuseppeTropea
62 c3ccd8f0 GiuseppeTropea
#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 59e008ed GiuseppeTropea
LDLIBS += $(LOCAL_PSNR_LDLIBS)
75 c3ccd8f0 GiuseppeTropea
76 e11386c0 CsabaKiraly
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 59e008ed GiuseppeTropea
LDLIBS += $(DYNAMIC_LDLIBS) -lrt
80 e11386c0 CsabaKiraly
endif
81
82
LINKER = $(CC)
83
84
all: $(OUTPUTFILE)
85
86
OBJS = ../chunk_transcoding/external_chunk_transcoding.o
87
ifeq ($(IO), httpevent)
88 59e008ed GiuseppeTropea
#TODO add: or equals httpmhd
89 e11386c0 CsabaKiraly
OBJS += http_chunk_puller.o
90
endif
91 1538a3bd GiuseppeTropea
92 e11386c0 CsabaKiraly
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 1538a3bd GiuseppeTropea
97 e11386c0 CsabaKiraly
$(OUTPUTFILE): $(OBJS)
98
	$(LINKER) $(LDFLAGS) $^ $(LDLIBS) -o $@
99 1538a3bd GiuseppeTropea
100
clean:
101 e11386c0 CsabaKiraly
	rm -f $(OUTPUTFILE)
102 1538a3bd GiuseppeTropea
	rm -f *.o