Statistics
| Branch: | Revision:

streamers / Makefile @ 63b2e58c

History | View | Annotate | Download (1.99 KB)

1
include utils.mak
2

    
3
CFLAGS = -g -Wall
4
CFLAGS += $(call cc-option, -Wdeclaration-after-statement)
5
CFLAGS += $(call cc-option, -Wno-switch)
6
CFLAGS += $(call cc-option, -Wdisabled-optimization)
7
CFLAGS += $(call cc-option, -Wpointer-arith)
8
CFLAGS += $(call cc-option, -Wredundant-decls)
9
CFLAGS += $(call cc-option, -Wno-pointer-sign)
10
CFLAGS += $(call cc-option, -Wcast-qual)
11
CFLAGS += $(call cc-option, -Wwrite-strings)
12
CFLAGS += $(call cc-option, -Wtype-limits)
13
CFLAGS += $(call cc-option, -Wundef)
14

    
15
CFLAGS += $(call cc-option, -funit-at-a-time)
16

    
17
GRAPES ?= GRAPES
18

    
19
CPPFLAGS = -I$(GRAPES)/include
20
CPPFLAGS += -I$(GRAPES)/som
21

    
22
ifdef DEBUG
23
CPPFLAGS += -DDEBUG
24
endif
25

    
26
LDFLAGS = -L$(GRAPES)/som/TopologyManager -L$(GRAPES)/som/ChunkTrading -L$(GRAPES)/som/ChunkBuffer -L$(GRAPES)/som/Scheduler -L$(GRAPES)/som/PeerSet -L$(GRAPES)/som/ChunkIDSet
27
LDLIBS = -ltrading -lcb -ltopman -lsched -lpeerset -lsignalling
28

    
29
OBJS = dumbstreamer.o streaming.o topology.o output.o net_helpers.o input.o chunk_signaling.o out-stream.o
30
ifdef THREADS
31
OBJS += loop-mt.o
32
CFLAGS += -pthread
33
LDFLAGS += -pthread
34
else
35
OBJS += loop.o
36
endif
37

    
38
ifndef DUMMY
39
FFDIR ?= ffmpeg
40
FFSRC ?= $(FFDIR)
41
OBJS += Chunkiser/input-stream-avs.o
42
LDFLAGS += -L$(FFDIR)/libavcodec -L$(FFDIR)/libavformat -L$(FFDIR)/libavutil
43
LDLIBS += -lavformat -lavcodec -lavutil
44
LDLIBS += -lm
45
LDLIBS += $(call ld-option, -lz)
46
LDLIBS += $(call ld-option, -lbz2)
47
else
48
OBJS += input-stream-dummy.o
49
endif
50

    
51
all: dumbstreamer
52

    
53
dumbstreamer: $(OBJS) $(GRAPES)/som/net_helper.o
54

    
55
Chunkiser/input-stream-avs.o: CPPFLAGS += -I$(FFSRC) 
56

    
57
GRAPES:
58
	git clone http://www.disi.unitn.it/~kiraly/PublicGits/GRAPES.git
59
	cd GRAPES; git checkout -b for-streamer origin/for-streamer
60

    
61
ffmpeg:
62
	svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg || (wget http://ffmpeg.org/releases/ffmpeg-checkout-snapshot.tar.bz2; tar xjf ffmpeg-checkout-snapshot.tar.bz2; mv ffmpeg-checkout-20* ffmpeg)
63
	cd ffmpeg; ./configure
64

    
65
prepare: $(GRAPES) $(FFSRC)
66
	$(MAKE) -C $(GRAPES)/som
67
	$(MAKE) -C $(FFSRC)
68

    
69
clean:
70
	rm -f dumbstreamer
71
	rm -f *.o