Statistics
| Branch: | Revision:

streamers / Makefile @ 0573c5f4

History | View | Annotate | Download (2.06 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 = dumbstreamer.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
ifdef FFDIR
50
FFSRC ?= $(FFDIR)
51
OBJS += Chunkiser/input-stream-avs.o
52
LDFLAGS += -L$(FFDIR)/libavcodec -L$(FFDIR)/libavformat -L$(FFDIR)/libavutil
53
LDLIBS += -lavformat -lavcodec -lavutil
54
LDLIBS += -lm
55
LDLIBS += $(call ld-option, -lz)
56
LDLIBS += $(call ld-option, -lbz2)
57
else
58
OBJS += input-stream-dummy.o
59
endif
60

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

    
66
all: $(EXECTARGET)
67

    
68
ifndef ML
69
$(EXECTARGET): $(OBJS) $(GRAPES)/som/net_helper.o
70
else
71
$(EXECTARGET): $(OBJS) $(GRAPES)/som/Tests/net_helper-ml.o $(GRAPES)/som/Tests/ml_helpers.o
72
endif
73

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

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

    
80
prepare: GRAPES
81
ifndef ML
82
	make -C GRAPES/som -f Makefile.som
83
else
84
	cd GRAPES; ./autogen.sh; make
85
endif
86

    
87
clean:
88
	rm -f $(EXECTARGET)
89
	rm -f *.o