Statistics
| Branch: | Revision:

grapes / src / Tests / Makefile @ ef8002fd

History | View | Annotate | Download (1.86 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 5731f27d Luca Abeni
TESTS = topology_test \
9 211a0bc9 Luca
        topology_test_attr \
10 5731f27d Luca Abeni
        chunk_encoding_test \
11
        chunk_sending_test \
12 b3dd32b0 Alessandro Russo
        chunk_signaling_test \
13 5731f27d Luca Abeni
        chunkidset_test \
14 b3dd32b0 Alessandro Russo
        chunkidset_test_bug \
15 2c424e37 Luca Abeni
        cb_test \
16 72b666da Luca Abeni
        config_test \
17 ad7e2977 Luca Abeni
        tman_test \
18 7342a625 Andrea Zito
        topology_test_th \
19
	cloud_test
20
21
DEPENDENCIES = libfilecloud.so
22 480921a6 Luca Abeni
23
CPPFLAGS = -I$(BASE)/include
24
25 f9d6272b Luca Abeni
LDFLAGS += -L..
26
LDLIBS += -lgrapes
27 480921a6 Luca Abeni
#LDFLAGS += -static
28 ad7e2977 Luca Abeni
29
all: $(TESTS)
30
31
include $(BASE)/src/utils.mak
32
33 fe4f75fc Luca Abeni
ifeq ($(ARCH),win32)
34
LDLIBS += -lws2_32
35
endif
36 480921a6 Luca Abeni
37 211a0bc9 Luca
topology_test_attr: topology_test_attr.o net_helpers.o
38 7722f69e Luca Abeni
topology_test_attr: ../net_helper$(NH_INCARNATION).o
39 211a0bc9 Luca
40 480921a6 Luca Abeni
topology_test: topology_test.o net_helpers.o
41 7722f69e Luca Abeni
topology_test: ../net_helper$(NH_INCARNATION).o
42 480921a6 Luca Abeni
43 ccf0be64 luca
topology_test_th: topology_test_th.o net_helpers.o
44
topology_test_th: ../net_helper.o
45
topology_test_th: CFLAGS += -pthread
46
topology_test_th: LDFLAGS += -pthread
47
48 a9979f3b Luca Abeni
chunk_encoding_test: chunk_encoding_test.o
49
50 410fd7f8 Luca Abeni
cb_test: cb_test.o
51 a9979f3b Luca Abeni
52 f51823b9 Alessandro Russo
chunkidset_test: chunkidset_test.o chunkid_set_h.o
53 aab9cd09 Luca
54 b3dd32b0 Alessandro Russo
chunkidset_test_bug: chunkidset_test_bug.o chunkid_set_h.o
55
56 bfd2c457 Luca Abeni
chunk_sending_test: chunk_sending_test.o net_helpers.o
57 7722f69e Luca Abeni
chunk_sending_test: ../net_helper$(NH_INCARNATION).o
58 480921a6 Luca Abeni
59 d1d96863 Alessandro Russo
chunk_signaling_test: chunk_signaling_test.o net_helpers.o chunkid_set_h.o
60 7722f69e Luca Abeni
chunk_signaling_test: ../net_helper$(NH_INCARNATION).o
61 c9e5a919 Alessandro Russo
62 72b666da Luca Abeni
tman_test: tman_test.o topology.o peer.o net_helpers.o
63 7722f69e Luca Abeni
tman_test: ../net_helper$(NH_INCARNATION).o
64 72b666da Luca Abeni
65 7342a625 Andrea Zito
cloud_test: cloud_test.o net_helpers.o libfilecloud.so
66
cloud_test: ../net_helper$(NH_INCARNATION).o
67
cloud_test: LDFLAGS += -ldl
68
69
70 ef8002fd Andrea Zito
libfilecloud.so: net_helpers.o
71
libfilecloud.so: ../net_helper$(NH_INCARNATION).o
72 7342a625 Andrea Zito
libfilecloud.so: CFLAGS += -shared -pthread
73
libfilecloud.so: cloud_helper_delegate_file.o
74
	$(CC) $(CFLAGS) -o $@ $^
75
76
cloud_helper_delegate_file.o: CFLAGS += -fPIC
77
78 5618ba78 Luca Abeni
clean::
79 0188740e Luca Abeni
	rm -f $(TESTS)
80 7342a625 Andrea Zito
	rm -f $(DEPENDENCIES)