Statistics
| Branch: | Revision:

grapes / src / Tests / Makefile @ 88f5c397

History | View | Annotate | Download (2.32 KB)

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

    
8
TESTS = topology_test \
9
        topology_test_attr \
10
        chunk_encoding_test \
11
        chunk_sending_test \
12
        chunk_signaling_test \
13
        chunkidset_test \
14
        chunkidset_test_bug \
15
        cb_test \
16
        config_test \
17
        tman_test \
18
        topology_test_th \
19
	cloud_test \
20
	cloudcast_topology_test \
21
	cloud_topology_monitor
22

    
23
DEPENDENCIES = libfilecloud.so
24

    
25
CPPFLAGS = -I$(BASE)/include
26

    
27
LDFLAGS += -L.. 
28
LDLIBS += -lgrapes -ldl
29
#LDFLAGS += -static
30

    
31
all: $(TESTS)
32

    
33
include $(BASE)/src/utils.mak
34

    
35
ifeq ($(ARCH),win32)
36
LDLIBS += -lws2_32
37
endif
38

    
39
topology_test_attr: topology_test_attr.o net_helpers.o
40
topology_test_attr: ../net_helper$(NH_INCARNATION).o
41

    
42
topology_test: topology_test.o net_helpers.o
43
topology_test: ../net_helper$(NH_INCARNATION).o
44

    
45
topology_test_th: topology_test_th.o net_helpers.o
46
topology_test_th: ../net_helper.o
47
topology_test_th: CFLAGS += -pthread
48
topology_test_th: LDFLAGS += -pthread
49

    
50
chunk_encoding_test: chunk_encoding_test.o
51

    
52
cb_test: cb_test.o
53

    
54
chunkidset_test: chunkidset_test.o chunkid_set_h.o
55

    
56
chunkidset_test_bug: chunkidset_test_bug.o chunkid_set_h.o
57

    
58
chunk_sending_test: chunk_sending_test.o net_helpers.o
59
chunk_sending_test: ../net_helper$(NH_INCARNATION).o
60

    
61
chunk_signaling_test: chunk_signaling_test.o net_helpers.o chunkid_set_h.o
62
chunk_signaling_test: ../net_helper$(NH_INCARNATION).o
63

    
64
tman_test: tman_test.o topology.o peer.o net_helpers.o
65
tman_test: ../net_helper$(NH_INCARNATION).o
66

    
67
cloud_test: cloud_test.o net_helpers.o libfilecloud.so
68
cloud_test: ../net_helper$(NH_INCARNATION).o
69
cloud_test: LDFLAGS += -ldl
70

    
71

    
72
libfilecloud.so: net_helpers.o
73
libfilecloud.so: ../net_helper$(NH_INCARNATION).o
74
libfilecloud.so: CFLAGS += -shared -pthread
75
libfilecloud.so: cloud_helper_delegate_file.o
76
	$(CC) $(CFLAGS) -o $@ $^
77

    
78
cloud_helper_delegate_file.o: CFLAGS += -fPIC
79

    
80
cloudcast_topology_test: cloudcast_topology_test.o net_helpers.o libfilecloud.so
81
cloudcast_topology_test: ../net_helper$(NH_INCARNATION).o
82
cloudcast_topology_test: LDFLAGS += -ldl
83

    
84
cloud_topology_monitor: cloud_topology_monitor.o net_helpers.o libfilecloud.so
85
cloud_topology_monitor: ../net_helper$(NH_INCARNATION).o
86
cloud_topology_monitor: LDFLAGS += -ldl
87
cloud_topology_monitor: CFLAGS += -I../TopologyManager
88

    
89
clean::
90
	rm -f $(TESTS)
91
	rm -f $(DEPENDENCIES)