Statistics
| Branch: | Revision:

grapes / src / Tests / Makefile @ ef8002fd

History | View | Annotate | Download (1.86 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

    
21
DEPENDENCIES = libfilecloud.so
22

    
23
CPPFLAGS = -I$(BASE)/include
24

    
25
LDFLAGS += -L..
26
LDLIBS += -lgrapes
27
#LDFLAGS += -static
28

    
29
all: $(TESTS)
30

    
31
include $(BASE)/src/utils.mak
32

    
33
ifeq ($(ARCH),win32)
34
LDLIBS += -lws2_32
35
endif
36

    
37
topology_test_attr: topology_test_attr.o net_helpers.o
38
topology_test_attr: ../net_helper$(NH_INCARNATION).o
39

    
40
topology_test: topology_test.o net_helpers.o
41
topology_test: ../net_helper$(NH_INCARNATION).o
42

    
43
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
chunk_encoding_test: chunk_encoding_test.o
49

    
50
cb_test: cb_test.o
51

    
52
chunkidset_test: chunkidset_test.o chunkid_set_h.o
53

    
54
chunkidset_test_bug: chunkidset_test_bug.o chunkid_set_h.o
55

    
56
chunk_sending_test: chunk_sending_test.o net_helpers.o
57
chunk_sending_test: ../net_helper$(NH_INCARNATION).o
58

    
59
chunk_signaling_test: chunk_signaling_test.o net_helpers.o chunkid_set_h.o
60
chunk_signaling_test: ../net_helper$(NH_INCARNATION).o
61

    
62
tman_test: tman_test.o topology.o peer.o net_helpers.o
63
tman_test: ../net_helper$(NH_INCARNATION).o
64

    
65
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
libfilecloud.so: net_helpers.o
71
libfilecloud.so: ../net_helper$(NH_INCARNATION).o
72
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
clean::
79
	rm -f $(TESTS)
80
	rm -f $(DEPENDENCIES)