Statistics
| Branch: | Revision:

streamers / Makefile @ 319e8eed

History | View | Annotate | Download (2.12 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
CFLAGS += -O0
24
CPPFLAGS += -DDEBUG
25
endif
26

    
27
ifdef DEBUGOUT
28
CPPFLAGS += -DDEBUGOUT
29
endif
30

    
31
ifdef ML
32
LDFLAGS += -L$(GRAPES)/som -L$(GRAPES)/ml -L$(LIBEVENT)/lib -L$(GRAPES)/dclog
33
LDLIBS += -lsom -lml -levent -ldclog -lm
34
CPPFLAGS += -I$(LIBEVENT)/include
35
else
36
LDFLAGS = -L$(GRAPES)/som/TopologyManager -L$(GRAPES)/som/ChunkTrading -L$(GRAPES)/som/ChunkBuffer
37
LDLIBS = -ltrading -lcb -ltopman
38
endif
39

    
40
OBJS = streamer.o streaming.o output.o net_helpers.o input.o out-stream.o
41
ifdef THREADS
42
OBJS += loop-mt.o
43
CFLAGS += -pthread
44
LDFLAGS += -pthread
45
else
46
OBJS += loop.o
47
endif
48

    
49
ifndef DUMMY
50
FFDIR ?= ffmpeg
51
FFSRC ?= $(FFDIR)
52
OBJS += Chunkiser/input-stream-avs.o
53
LDFLAGS += -L$(FFDIR)/libavcodec -L$(FFDIR)/libavformat -L$(FFDIR)/libavutil
54
LDLIBS += -lavformat -lavcodec -lavutil
55
LDLIBS += -lm
56
LDLIBS += $(call ld-option, -lz)
57
LDLIBS += $(call ld-option, -lbz2)
58
else
59
OBJS += input-stream-dummy.o
60
endif
61

    
62
EXECTARGET = dumbstreamer
63
ifdef ML
64
EXECTARGET := $(EXECTARGET)-ml
65
endif
66

    
67
all: $(EXECTARGET)
68

    
69
ifndef ML
70
$(EXECTARGET): $(OBJS) $(GRAPES)/som/net_helper.o
71
else
72
$(EXECTARGET): $(OBJS) $(GRAPES)/som/Tests/net_helper-ml.o $(GRAPES)/som/Tests/ml_helpers.o
73
endif
74
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
75

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

    
78
GRAPES:
79
	git clone http://www.disi.unitn.it/~kiraly/PublicGits/GRAPES.git
80
	cd GRAPES; git checkout -b for-streamer-0.7.1 origin/for-streamer-0.7.1
81

    
82
prepare: GRAPES
83
ifndef ML
84
	$(MAKE) -C GRAPES/som -f Makefile.som
85
else
86
	cd GRAPES; ./autogen.sh; $(MAKE)
87
endif
88

    
89
clean:
90
	rm -f $(EXECTARGET)
91
	rm -f *.o