Statistics
| Branch: | Revision:

grapes / src / Tests / Makefile @ 02eac2ca

History | View | Annotate | Download (2.88 KB)

1
ifndef BASE
2
BASE = ../..
3
else
4
vpath %.c $(BASE)/src/$(notdir $(CURDIR))
5
endif
6
CFGDIR ?= ..
7

    
8
NH_INCARNATION ?= udp
9
NET_HELPER = ../net_helper-$(NH_INCARNATION)
10

    
11
TESTS = topology_test \
12
        topology_test_attr \
13
        chunk_encoding_test \
14
        chunk_sending_test \
15
        chunk_signaling_test \
16
        chunkidset_test \
17
        chunkidset_test_bug \
18
        cb_test \
19
        config_test \
20
        tman_test \
21
        topo_msg_size_test \
22
        inet_test
23

    
24
ifneq ($(ARCH),win32)
25
  TESTS += topology_test_th \
26
           chunkiser_test   \
27
	   cloud_test \
28
           cloudcast_topology_test \
29
           cloud_topology_monitor \
30
           test_queue
31
endif
32

    
33
CPPFLAGS = -I$(BASE)/include
34

    
35
LDFLAGS += -L..
36
LDLIBS += -lgrapes
37
#LDFLAGS += -static
38

    
39
ifdef DELEGATE
40
LDLIBS += -ldl
41
endif
42

    
43
all: $(TESTS)
44

    
45
include $(BASE)/src/utils.mak
46

    
47
ifeq ($(ARCH),win32)
48
LDLIBS += -lws2_32 -lwsock32
49
endif
50

    
51
topo_msg_size_test: $(NET_HELPER).o
52

    
53
topology_test_attr: topology_test_attr.o net_helpers.o
54
topology_test_attr: $(NET_HELPER).o
55

    
56
topology_test: topology_test.o net_helpers.o
57
topology_test: $(NET_HELPER).o
58

    
59
topology_test_th: topology_test_th.o net_helpers.o
60
topology_test_th: $(NET_HELPER).o
61
topology_test_th: CFLAGS += -pthread
62
topology_test_th: LDFLAGS += -pthread
63

    
64
chunk_encoding_test: chunk_encoding_test.o
65

    
66
cb_test: cb_test.o
67

    
68
chunkidset_test: chunkidset_test.o chunkid_set_h.o
69

    
70
chunkidset_test_bug: chunkidset_test_bug.o chunkid_set_h.o
71

    
72
chunk_sending_test: chunk_sending_test.o net_helpers.o
73
chunk_sending_test: $(NET_HELPER).o
74

    
75
chunk_signaling_test: chunk_signaling_test.o net_helpers.o chunkid_set_h.o
76
chunk_signaling_test: $(NET_HELPER).o
77

    
78
config_test: config_test.o
79

    
80
tman_test: tman_test.o topology.o peer.o net_helpers.o
81
tman_test: $(NET_HELPER).o
82

    
83
inet_test: inet_test.o net_helpers.o
84
inet_test: $(NET_HELPER).o
85
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@.exe
86

    
87
chunkiser_test: chunkiser_test.o
88
chunkiser_test: $(NET_HELPER).o
89
ifdef FFDIR
90
chunkiser_test: CFLAGS += -pthread
91
chunkiser_test: LDFLAGS += -pthread -L$(FFDIR)/libavutil -L$(FFDIR)/libavcore -L$(FFDIR)/libavcodec -L$(FFDIR)/libavformat -L$(FFDIR)/libswscale
92
chunkiser_test: LDLIBS += -lavformat -lavcodec -lswscale -lavutil -lm
93
chunkiser_test: LDLIBS += $(call ld-option, -lavcore)
94
chunkiser_test: LDLIBS += $(call ld-option, -lz)
95
chunkiser_test: LDLIBS += $(call ld-option, -lbz2)
96
ifdef GTK
97
chunkiser_test: LDLIBS += `pkg-config --libs gtk+-2.0`
98
chunkiser_test: LDLIBS += `pkg-config --libs alsa`
99
endif
100
endif
101

    
102
cloud_test: cloud_test.o net_helpers.o
103
cloud_test: $(NET_HELPER).o
104

    
105
cloudcast_topology_test: cloudcast_topology_test.o net_helpers.o
106
cloudcast_topology_test: $(NET_HELPER).o
107
cloudcast_topology_test: CFLAGS += -pthread
108
cloudcast_topology_test: LDFLAGS += -pthread
109

    
110
cloud_topology_monitor: cloud_topology_monitor.o net_helpers.o
111
cloud_topology_monitor: $(NET_HELPER).o
112

    
113
test_queue: test_queue.o
114
test_queue: CFLAGS += -I$(BASE)/src/Utils
115

    
116
clean::
117
	rm -f $(TESTS)
118
	rm -f $(DEPENDENCIES)