Statistics
| Branch: | Tag: | Revision:

root / xseg / peers / user / Makefile @ 1d086ace

History | View | Annotate | Download (4.2 kB)

1
# Copyright 2012 GRNET S.A. All rights reserved.
2
#
3
# Redistribution and use in source and binary forms, with or
4
# without modification, are permitted provided that the following
5
# conditions are met:
6
#
7
#   1. Redistributions of source code must retain the above
8
#      copyright notice, this list of conditions and the following
9
#      disclaimer.
10
#   2. Redistributions in binary form must reproduce the above
11
#      copyright notice, this list of conditions and the following
12
#      disclaimer in the documentation and/or other materials
13
#      provided with the distribution.
14
#
15
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
16
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
19
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
25
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26
# POSSIBILITY OF SUCH DAMAGE.
27
#
28
# The views and conclusions contained in the software and
29
# documentation are those of the authors and should not be
30
# interpreted as representing official policies, either expressed
31
# or implied, of GRNET S.A.
32
#
33

    
34
.PHONY: default all clean install install-src
35

    
36
include $(XSEG_HOME)/base.mk
37
PEERS := xseg mt-sosd dummy mt-mapperd pfiled vlmc-xseg st-vlmcd mt-pfiled \
38
	bench
39

    
40
FILES="Makefile"
41
FILES+=$(shell ls *.h)
42
FILES+=$(shell ls *.c)
43
FILES+=""
44

    
45
CPREQS=$(filter %.c,$^)
46

    
47
SUBDIR:=$(subst $(XSEG_HOME),,$(CURDIR))
48

    
49

    
50
default: $(PEERS)
51

    
52
#all: filed xseg sosd vlmcd mapperd
53
#all: filed xseg vlmcd mapperd
54
all: filed xseg mt-sosd dummy mt-vlmcd mapperd mt-mapperd pfiled monitor vlmc-xseg st-vlmcd mt-pfiled
55

    
56

    
57
filed: filed.c $(BASE)/xseg/xseg.h
58
	$(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg -lpthread
59

    
60
vlmcd: vlmcd.c common.c $(BASE)/xseg/xseg.h $(BASE)/xseg/protocol.h common.h
61
	$(CC) $(CFLAGS) -o $@ $< common.c $(INC) -L$(LIB) -lxseg
62

    
63
mapperd: mapperd.c common.c $(BASE)/xseg/xseg.h $(BASE)/xseg/protocol.h common.h
64
	$(CC) $(CFLAGS) -o $@ $< common.c $(INC) -L$(LIB) -lxseg
65

    
66
sosd: sosd.c $(BASE)/xseg/xseg.h $(BASE)/util_libs/user/sos/sos.h
67
	$(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg -lsos
68

    
69
xseg: xseg-tool.c $(BASE)/xtypes/xheap.c $(BASE)/xseg/xseg.h
70
	$(CC) $(CFLAGS) -o $@ $< $(BASE)/xtypes/xheap.c $(INC) -L$(LIB) -lxseg
71

    
72
mt-sosd: mt-sosd.c peer.c peer.h
73
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lrados -lpthread \
74
							-lcrypto -DMT
75

    
76
dummy: dummy.c peer.c peer.h
77
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
78

    
79
bench: bench-xseg.c peer.c bench-timer.c bench-xseg.h peer.h
80
	$(CC) $(CFLAGS) -o $@ $(CPREQS) $(INC) -L$(LIB) -lxseg -lpthread
81

    
82
monitor: monitor.c peer.c peer.h
83
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
84

    
85
mt-vlmcd: mt-vlmcd.c peer.c peer.h $(BASE)/xseg/protocol.h
86
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
87

    
88
mt-pfiled: mt-pfiled.c peer.c peer.h $(BASE)/xseg/protocol.h
89
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
90

    
91
st-vlmcd: mt-vlmcd.c peer.c peer.h $(BASE)/xseg/protocol.h
92
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg
93

    
94
mt-mapperd: mt-mapperd.c peer.c peer.h $(BASE)/xseg/protocol.h
95
	$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -DST_THREADS -lxseg -lst -lcrypto
96

    
97
pfiled: pfiled.c common.c $(BASE)/xseg/xseg.h $(BASE)/xseg/protocol.h common.h
98
	$(CC) $(CFLAGS) -o $@ $< common.c  $(INC) -L$(LIB) -lxseg -lpthread
99

    
100
vlmc-xseg: vlmc-tool.c $(BASE)/xseg/xseg.h
101
	$(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg
102

    
103
install:
104
	install -d $(DESTDIR)$(bindir)
105
	@for p in $(PEERS); do\
106
		install -o 0 -g 0 -m 755 -t $(DESTDIR)$(bindir) $$p ; \
107
	done
108

    
109
install-src:
110
	install -d $(DESTDIR)$(srcdir)$(SUBDIR)
111
	@for f in $(FILES) ; do \
112
		install -o 0 -g 0 -m 644 -t $(DESTDIR)$(srcdir)$(SUBDIR) $$f ; \
113
	done
114

    
115
clean:
116
	rm -f filed xseg sosd vlmcd mapperd mt-sosd dummy monitor mt-mapperd \
117
		pfiled vlmc-xseg st-vlmcd mt-vlmcd mt-pfiled bench