Statistics
| Branch: | Revision:

chunker-player / common.mak @ 18a925b7

History | View | Annotate | Download (1.7 KB)

1
#the following external libraries are needed by both
2
#the chunker_streamer and the chunker_player
3
#basically these are ffmpeg-related
4

    
5
#default stuff from here on
6
ifeq ($(LD),i586-mingw32msvc-ld)
7
WINDOWS = 1
8
endif
9

    
10
ifdef WINDOWS
11
CFLAGS = -g -O0 -Wall
12
else
13
CFLAGS = -pthread -g -O0 -Wall
14
LDFLAGS += -pthread
15
DYNAMIC_LDLIBS += -lm
16
endif
17

    
18
NAPA ?= ../../../NAPA-BASELIBS
19

    
20
CFLAGS += -DHAVE_OPENGL -Wl,--warn-common -Wl,--as-needed -Wl,-Bsymbolic
21
CPPFLAGS += -I../chunk_transcoding -I../ -I$(NAPA)/include
22

    
23
#default fmmpeg here
24
LOCAL_FFMPEG_CPPFLAGS = -I$(LOCAL_FFMPEG)/include
25
#LOCAL_FFMPEG_LDFLAGS = -L$(LOCAL_FFMPEG)/lib
26

    
27
ifdef WINDOWS
28
LOCAL_FFMPEG_LDLIBS = $(LOCAL_FFMPEG)/lib/libavdevice.a $(LOCAL_FFMPEG)/lib/libavformat.a $(LOCAL_FFMPEG)/lib/libavcodec.a $(LOCAL_FFMPEG)/lib/libavutil.a $(LOCAL_FFMPEG)/lib/libswscale.a -lws2_32
29
else
30
LOCAL_FFMPEG_LDLIBS = $(LOCAL_FFMPEG)/lib/libavdevice.a $(LOCAL_FFMPEG)/lib/libavformat.a $(LOCAL_FFMPEG)/lib/libavcodec.a $(LOCAL_FFMPEG)/lib/libavutil.a $(LOCAL_FFMPEG)/lib/libswscale.a
31
endif
32

    
33
LOCAL_COMMON_CPPFLAGS = -I$(LOCAL_X264)/include -I$(LOCAL_BZ2)/include -I$(LOCAL_Z)/include -I$(LOCAL_MP3LAME)/include
34
#LOCAL_COMMON_LDFLAGS = -L$(LOCAL_X264)/lib -L$(LOCAL_BZ2)/lib -L$(LOCAL_MP3LAME)/lib
35
LOCAL_COMMON_LDLIBS = $(LOCAL_X264)/lib/libx264.a $(LOCAL_BZ2)/lib/libbz2.a $(LOCAL_Z)/lib/libz.a
36
#LOCAL_COMMON_LDLIBS += $(LOCAL_MP3LAME)/lib/libmp3lame.a
37

    
38
cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
39
              > /dev/null 2>&1; then echo "$(1)"; fi ;)
40

    
41
ld-option = $(shell if echo "int main(){return 0;}" | \
42
		$(CC) $(LDFLAGS) $(CFLAGS) $(1) -o /dev/null -xc - \
43
		> /dev/null 2>&1; then echo "$(1)"; fi ;)
44

    
45
LDLIBS += $(call ld-option, -lva)
46
LDLIBS += $(call ld-option, -lvga)