Statistics
| Branch: | Revision:

streamers / Makefile @ 913146ae

History | View | Annotate | Download (3.08 KB)

1 ecf6e64a Luca Abeni
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 89adc95a ArpadBakay
NAPA ?= ../../NAPA-BASELIBS
18
GRAPES ?= ../../GRAPES
19 89e893e2 Luca
20 a537d172 Csaba Kiraly
CPPFLAGS = -I$(NAPA)/include
21
CPPFLAGS += -I$(GRAPES)/include
22 89e893e2 Luca
23 e64fc7e5 Luca
ifdef DEBUG
24 130de9fe Csaba Kiraly
CFLAGS += -O0
25 e64fc7e5 Luca
CPPFLAGS += -DDEBUG
26 b58cb76a Csaba Kiraly
OBJS += dbg.o
27 e64fc7e5 Luca
endif
28
29 89adc95a ArpadBakay
30 bb95b0c9 Csaba Kiraly
ifdef DEBUGOUT
31
CPPFLAGS += -DDEBUGOUT
32
endif
33
34 0e66f272 Csaba Kiraly
LDFLAGS += -L$(GRAPES)
35 a537d172 Csaba Kiraly
LDLIBS += -lgrapes
36 bb95b0c9 Csaba Kiraly
ifdef ML
37 89adc95a ArpadBakay
LDFLAGS += -L$(NAPA)/ml -L$(LIBEVENT_DIR)/lib
38 23442a5b ArpadBakay
LDLIBS += -lml
39 a2d8e810 ArpadBakay
CPPFLAGS += -I$(NAPA)/ml/include -I$(LIBEVENT_DIR)/include
40 a874d5ac Csaba Kiraly
ifdef MONL
41 a537d172 Csaba Kiraly
LDFLAGS += -L$(NAPA)/dclog -L$(NAPA)/rep -L$(NAPA)/monl -L$(NAPA)/common
42 23442a5b ArpadBakay
LDLIBS += -lmon -lrep -ldclog -lcommon
43 a874d5ac Csaba Kiraly
CPPFLAGS += -DMONL
44 f5783ec4 Csaba Kiraly
ifdef STATIC
45
CC=g++
46 23442a5b ArpadBakay
else
47
LDLIBS_EXTRA = -lm -lstdc++
48 f5783ec4 Csaba Kiraly
endif
49 a874d5ac Csaba Kiraly
endif
50 913146ae ArpadBakay
LDLIBS += -Wl,-static -levent $(if $(STATIC), , -Wl,-Bdynamic) -lrt
51 29b5c4a8 MarcoMellia
#LDLIBS += -levent -lrt
52 bb95b0c9 Csaba Kiraly
endif
53 89e893e2 Luca
54 b58cb76a Csaba Kiraly
OBJS += streaming.o
55 8e14c74c Csaba Kiraly
OBJS += input.o
56
OBJS += output.o 
57
OBJS += net_helpers.o 
58 7d624a77 Csaba Kiraly
OBJS += topology.o
59
OBJS += chunk_signaling.o
60 5bc2469e Csaba Kiraly
OBJS += chunklock.o
61 581339c4 Csaba Kiraly
OBJS += channel.o
62 d92a24a6 Luca Abeni
ifdef THREADS
63
OBJS += loop-mt.o
64
CFLAGS += -pthread
65
LDFLAGS += -pthread
66
else
67
OBJS += loop.o
68
endif
69
70 a874d5ac Csaba Kiraly
ifdef MONL
71 9c4f8e7e Csaba Kiraly
OBJS += measures-monl.o
72 473a00b3 Csaba Kiraly
else
73
OBJS += measures.o
74 a874d5ac Csaba Kiraly
endif
75
76 3c017d8c Csaba Kiraly
ifndef DUMMY
77 d74bb0e5 Luca Abeni
OBJS += Chunkiser/input-stream-avs.o out-stream-avf.o
78 a2d8e810 ArpadBakay
CPPFLAGS += -I$(FFMPEG_DIR)/include
79 89adc95a ArpadBakay
LDFLAGS += -L$(FFMPEG_DIR)/lib
80 709f774c Luca
LDLIBS += -lavformat -lavcodec -lavutil
81 23442a5b ArpadBakay
LDLIBS_EXTRA += -lm
82 ecf6e64a Luca Abeni
LDLIBS += $(call ld-option, -lz)
83
LDLIBS += $(call ld-option, -lbz2)
84 709f774c Luca
else
85 be894e4d Luca Abeni
OBJS += input-stream-dummy.o out-stream-dummy.o
86 709f774c Luca
endif
87 89e893e2 Luca
88 23442a5b ArpadBakay
LDLIBS += $(LDLIBS_EXTRA)
89
90 9eb35f54 Csaba Kiraly
EXECTARGET = offerstreamer
91 bb95b0c9 Csaba Kiraly
ifdef ML
92
EXECTARGET := $(EXECTARGET)-ml
93
endif
94 18b3d383 Csaba Kiraly
ifdef MONL
95
EXECTARGET := $(EXECTARGET)-monl
96
endif
97 6bcb761d Csaba Kiraly
ifdef THREADS
98
EXECTARGET := $(EXECTARGET)-threads
99
endif
100 89e893e2 Luca
101 ae7b251e Csaba Kiraly
ifdef STATIC
102 89adc95a ArpadBakay
LDFLAGS += -static -v
103 ae7b251e Csaba Kiraly
EXECTARGET := $(EXECTARGET)-static
104
endif
105
106 b36d3310 Csaba Kiraly
ifdef RELEASE
107
EXECTARGET := $(EXECTARGET)-$(RELEASE)
108
endif
109
110 6dcf5ec0 Csaba Kiraly
all: $(EXECTARGET)
111 89e893e2 Luca
112 bb95b0c9 Csaba Kiraly
ifndef ML
113 0e66f272 Csaba Kiraly
$(EXECTARGET): $(OBJS) $(GRAPES)/net_helper.o
114 bb95b0c9 Csaba Kiraly
else
115 0e66f272 Csaba Kiraly
$(EXECTARGET): $(OBJS) $(GRAPES)/net_helper-ml.o
116 bb95b0c9 Csaba Kiraly
endif
117 89e893e2 Luca
118 f211f409 Csaba Kiraly
$(EXECTARGET).o: streamer.o
119 984f5a9b Csaba Kiraly
	ln -sf streamer.o $(EXECTARGET).o
120 89e893e2 Luca
121 89adc95a ArpadBakay
out-stream-avf.o Chunkiser/input-stream-avs.o: CPPFLAGS += -I$(FFMPEG_DIR)/include 
122 709f774c Luca
123 42ae36af Luca Abeni
GRAPES:
124 aefc7450 Csaba Kiraly
	git clone http://www.disi.unitn.it/~kiraly/PublicGits/GRAPES.git
125 d67ef29a Csaba Kiraly
	cd GRAPES; git checkout -b for-streamer-0.8.3 origin/for-streamer-0.8.3
126 42ae36af Luca Abeni
127 63b2e58c Luca Abeni
ffmpeg:
128 8f8bd3b6 Csaba Kiraly
	(wget http://ffmpeg.org/releases/ffmpeg-checkout-snapshot.tar.bz2; tar xjf ffmpeg-checkout-snapshot.tar.bz2; mv ffmpeg-checkout-20* ffmpeg) || svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
129 63b2e58c Luca Abeni
	cd ffmpeg; ./configure
130
131
prepare: $(GRAPES) $(FFSRC)
132 0e66f272 Csaba Kiraly
	$(MAKE) -C $(GRAPES) -f Makefile
133 a537d172 Csaba Kiraly
ifdef ML
134
	cd $(NAPA); ./autogen.sh; $(MAKE)
135 0573c5f4 Csaba Kiraly
endif
136 63b2e58c Luca Abeni
	$(MAKE) -C $(FFSRC)
137 42ae36af Luca Abeni
138 89e893e2 Luca
clean:
139 6dcf5ec0 Csaba Kiraly
	rm -f $(EXECTARGET)
140 0e66f272 Csaba Kiraly
	rm -f $(GRAPES)/net_helper-ml.o
141
	rm -f $(GRAPES)/net_helper.o
142 89e893e2 Luca
	rm -f *.o
143 0e7105fe Csaba Kiraly
	rm -f Chunkiser/*.o