Statistics
| Branch: | Revision:

grapes / src / Tests / Makefile @ 02eac2ca

History | View | Annotate | Download (2.88 KB)

1 d97b1942 Luca Abeni
ifndef BASE
2 6d557f68 Luca Abeni
BASE = ../..
3 e91f1bd5 Luca Abeni
else
4
vpath %.c $(BASE)/src/$(notdir $(CURDIR))
5 d97b1942 Luca Abeni
endif
6
CFGDIR ?= ..
7
8 d22618ac Csaba Kiraly
NH_INCARNATION ?= udp
9
NET_HELPER = ../net_helper-$(NH_INCARNATION)
10
11 5731f27d Luca Abeni
TESTS = topology_test \
12 211a0bc9 Luca
        topology_test_attr \
13 5731f27d Luca Abeni
        chunk_encoding_test \
14
        chunk_sending_test \
15 b3dd32b0 Alessandro Russo
        chunk_signaling_test \
16 5731f27d Luca Abeni
        chunkidset_test \
17 b3dd32b0 Alessandro Russo
        chunkidset_test_bug \
18 2c424e37 Luca Abeni
        cb_test \
19 72b666da Luca Abeni
        config_test \
20 ad7e2977 Luca Abeni
        tman_test \
21 02eac2ca Alessandro Russo
        topo_msg_size_test \
22
        inet_test
23 7342a625 Andrea Zito
24 e8c1ddb2 Luca Abeni
ifneq ($(ARCH),win32)
25
  TESTS += topology_test_th \
26 269bfb3c Luca Abeni
           chunkiser_test   \
27 04dd3295 Luca Abeni
	   cloud_test \
28
           cloudcast_topology_test \
29
           cloud_topology_monitor \
30
           test_queue
31 e8c1ddb2 Luca Abeni
endif
32 7a3622a4 Luca Abeni
33 480921a6 Luca Abeni
CPPFLAGS = -I$(BASE)/include
34
35 36b53b6f Andrea Zito
LDFLAGS += -L..
36 eef20cad Luca Abeni
LDLIBS += -lgrapes
37 480921a6 Luca Abeni
#LDFLAGS += -static
38 ad7e2977 Luca Abeni
39 eef20cad Luca Abeni
ifdef DELEGATE
40
LDLIBS += -ldl
41
endif
42
43 ad7e2977 Luca Abeni
all: $(TESTS)
44
45
include $(BASE)/src/utils.mak
46
47 fe4f75fc Luca Abeni
ifeq ($(ARCH),win32)
48 02eac2ca Alessandro Russo
LDLIBS += -lws2_32 -lwsock32
49 fe4f75fc Luca Abeni
endif
50 480921a6 Luca Abeni
51 64fa0d9c Luca Abeni
topo_msg_size_test: $(NET_HELPER).o
52 3dc90458 Luca Abeni
53 211a0bc9 Luca
topology_test_attr: topology_test_attr.o net_helpers.o
54 d22618ac Csaba Kiraly
topology_test_attr: $(NET_HELPER).o
55 211a0bc9 Luca
56 480921a6 Luca Abeni
topology_test: topology_test.o net_helpers.o
57 d22618ac Csaba Kiraly
topology_test: $(NET_HELPER).o
58 480921a6 Luca Abeni
59 ccf0be64 luca
topology_test_th: topology_test_th.o net_helpers.o
60 d22618ac Csaba Kiraly
topology_test_th: $(NET_HELPER).o
61 ccf0be64 luca
topology_test_th: CFLAGS += -pthread
62
topology_test_th: LDFLAGS += -pthread
63
64 a9979f3b Luca Abeni
chunk_encoding_test: chunk_encoding_test.o
65
66 410fd7f8 Luca Abeni
cb_test: cb_test.o
67 a9979f3b Luca Abeni
68 f51823b9 Alessandro Russo
chunkidset_test: chunkidset_test.o chunkid_set_h.o
69 aab9cd09 Luca
70 b3dd32b0 Alessandro Russo
chunkidset_test_bug: chunkidset_test_bug.o chunkid_set_h.o
71
72 bfd2c457 Luca Abeni
chunk_sending_test: chunk_sending_test.o net_helpers.o
73 d22618ac Csaba Kiraly
chunk_sending_test: $(NET_HELPER).o
74 480921a6 Luca Abeni
75 d1d96863 Alessandro Russo
chunk_signaling_test: chunk_signaling_test.o net_helpers.o chunkid_set_h.o
76 d22618ac Csaba Kiraly
chunk_signaling_test: $(NET_HELPER).o
77 c9e5a919 Alessandro Russo
78 02eac2ca Alessandro Russo
config_test: config_test.o
79
80 72b666da Luca Abeni
tman_test: tman_test.o topology.o peer.o net_helpers.o
81 d22618ac Csaba Kiraly
tman_test: $(NET_HELPER).o
82 72b666da Luca Abeni
83 02eac2ca Alessandro Russo
inet_test: inet_test.o net_helpers.o
84
inet_test: $(NET_HELPER).o
85
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@.exe
86
87 7a3622a4 Luca Abeni
chunkiser_test: chunkiser_test.o
88 d22618ac Csaba Kiraly
chunkiser_test: $(NET_HELPER).o
89 89aef955 Luca Abeni
ifdef FFDIR
90 7a3622a4 Luca Abeni
chunkiser_test: CFLAGS += -pthread
91 a7abbf9e Luca Abeni
chunkiser_test: LDFLAGS += -pthread -L$(FFDIR)/libavutil -L$(FFDIR)/libavcore -L$(FFDIR)/libavcodec -L$(FFDIR)/libavformat -L$(FFDIR)/libswscale
92 415b9abf Luca Abeni
chunkiser_test: LDLIBS += -lavformat -lavcodec -lswscale -lavutil -lm
93 c06e5505 Luca Abeni
chunkiser_test: LDLIBS += $(call ld-option, -lavcore)
94 7a3622a4 Luca Abeni
chunkiser_test: LDLIBS += $(call ld-option, -lz)
95
chunkiser_test: LDLIBS += $(call ld-option, -lbz2)
96 a7abbf9e Luca Abeni
ifdef GTK
97
chunkiser_test: LDLIBS += `pkg-config --libs gtk+-2.0`
98
chunkiser_test: LDLIBS += `pkg-config --libs alsa`
99
endif
100 89aef955 Luca Abeni
endif
101 7a3622a4 Luca Abeni
102 5ceafcf3 Andrea Zito
cloud_test: cloud_test.o net_helpers.o
103 64fa0d9c Luca Abeni
cloud_test: $(NET_HELPER).o
104 7342a625 Andrea Zito
105 5ceafcf3 Andrea Zito
cloudcast_topology_test: cloudcast_topology_test.o net_helpers.o
106 64fa0d9c Luca Abeni
cloudcast_topology_test: $(NET_HELPER).o
107 603e2817 Luca Abeni
cloudcast_topology_test: CFLAGS += -pthread
108 04dd3295 Luca Abeni
cloudcast_topology_test: LDFLAGS += -pthread
109 88f5c397 Andrea Zito
110 5ceafcf3 Andrea Zito
cloud_topology_monitor: cloud_topology_monitor.o net_helpers.o
111 64fa0d9c Luca Abeni
cloud_topology_monitor: $(NET_HELPER).o
112 36b53b6f Andrea Zito
113
test_queue: test_queue.o
114 6a4988a7 Luca Abeni
test_queue: CFLAGS += -I$(BASE)/src/Utils
115 36b53b6f Andrea Zito
116 5618ba78 Luca Abeni
clean::
117 0188740e Luca Abeni
	rm -f $(TESTS)
118 7342a625 Andrea Zito
	rm -f $(DEPENDENCIES)