# 1. Redistributions of source code must retain the above
# copyright notice, this list of conditions and the following
# disclaimer.
+#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials
.PHONY: default all clean install install-src
include $(XSEG_HOME)/base.mk
-PEERS := xseg mt-sosd dummy mt-mapperd pfiled vlmc-xseg st-vlmcd mt-pfiled \
- bench
+#PEERS := xseg archip-sosd archip-mapperd archip-vlmcd archip-filed archip-bench
+PEERS := xseg archip-sosd archip-mapperd archip-vlmcd archip-filed archip-bench archip-dummy
FILES="Makefile"
FILES+=$(shell ls *.h)
#all: filed xseg sosd vlmcd mapperd
#all: filed xseg vlmcd mapperd
-all: filed xseg mt-sosd dummy mt-vlmcd mapperd mt-mapperd pfiled monitor vlmc-xseg st-vlmcd mt-pfiled
-
+all: xseg archip-sosd archip-dummy archip-vlmcd mapperd archip-mapperd pfiled monitor vlmc-xseg archip-vlmcd archip-filed archip-bench
-filed: filed.c $(BASE)/xseg/xseg.h
- $(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg -lpthread
vlmcd: vlmcd.c common.c $(BASE)/xseg/xseg.h $(BASE)/xseg/protocol.h common.h
$(CC) $(CFLAGS) -o $@ $< common.c $(INC) -L$(LIB) -lxseg
sosd: sosd.c $(BASE)/xseg/xseg.h $(BASE)/util_libs/user/sos/sos.h
$(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg -lsos
+monitor: monitor.c peer.c peer.h
+ $(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
+
+pfiled: pfiled.c common.c $(BASE)/xseg/xseg.h $(BASE)/xseg/protocol.h common.h
+ $(CC) $(CFLAGS) -o $@ $< common.c $(INC) -L$(LIB) -lxseg -lpthread
+
+vlmc-xseg: vlmc-tool.c $(BASE)/xseg/xseg.h
+ $(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg
+
xseg: xseg-tool.c $(BASE)/xtypes/xheap.c $(BASE)/xseg/xseg.h
$(CC) $(CFLAGS) -o $@ $< $(BASE)/xtypes/xheap.c $(INC) -L$(LIB) -lxseg
-mt-sosd: mt-sosd.c peer.c peer.h
- $(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lrados -lpthread \
+archip-sosd: mt-sosd.c hash.c hash.h peer.c peer.h
+ $(CC) $(CFLAGS) -o $@ $(CPREQS) $(INC) -L$(LIB) -lxseg -lrados -lpthread \
-lcrypto -DMT
-
-dummy: dummy.c peer.c peer.h
+archip-dummy: dummy.c peer.c peer.h
$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
-bench: bench-xseg.c peer.c timer.c bench-xseg.h peer.h
- $(CC) $(CFLAGS) -o $@ $(CPREQS) $(INC) -L$(LIB) -lxseg -lpthread
-
-monitor: monitor.c peer.c peer.h
- $(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
+BENCH_PREQ=bench-xseg.c peer.c bench-lfsr.c bench-timer.c bench-utils.c \
+ bench-report.c bench-verify.c \
+ bench-xseg.h peer.h bench-lfsr.h $(BASE)/xseg/protocol.h
-mt-vlmcd: mt-vlmcd.c peer.c peer.h $(BASE)/xseg/protocol.h
- $(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
+archip-bench: $(BENCH_PREQ)
+ $(CC) $(CFLAGS) -o $@ $(CPREQS) $(INC) -L$(LIB) -lxseg -lpthread -lm
-mt-pfiled: mt-pfiled.c peer.c peer.h $(BASE)/xseg/protocol.h
- $(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg -lpthread -DMT
+archip-filed: filed.c peer.c peer.h hash.c hash.h $(BASE)/xseg/protocol.h
+ $(CC) $(CFLAGS) -o $@ $(CPREQS) $(INC) -L$(LIB) -lxseg -lpthread -DMT \
+ -lcrypto
-st-vlmcd: mt-vlmcd.c peer.c peer.h $(BASE)/xseg/protocol.h
+archip-vlmcd: mt-vlmcd.c peer.c peer.h $(BASE)/xseg/protocol.h
$(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -lxseg
-mt-mapperd: mt-mapperd.c peer.c peer.h $(BASE)/xseg/protocol.h
- $(CC) $(CFLAGS) -o $@ $< peer.c $(INC) -L$(LIB) -DST_THREADS -lxseg -lst -lcrypto
+MAPPER_PREQ=mapper.c mapper.h peer.c peer.h hash.h hash.c mapper-handling.c \
+ mapper-versions.h mapper-versions.c mapper-version0.h mapper-version0.c \
+ mapper-version1.h mapper-version1.c mapper-version2.h mapper-version2.c \
+ $(BASE)/xseg/protocol.h
-pfiled: pfiled.c common.c $(BASE)/xseg/xseg.h $(BASE)/xseg/protocol.h common.h
- $(CC) $(CFLAGS) -o $@ $< common.c $(INC) -L$(LIB) -lxseg -lpthread
-
-vlmc-xseg: vlmc-tool.c $(BASE)/xseg/xseg.h
- $(CC) $(CFLAGS) -o $@ $< $(INC) -L$(LIB) -lxseg
+archip-mapperd: $(MAPPER_PREQ)
+ $(CC) $(CFLAGS) -o $@ $(CPREQS) $(INC) -L$(LIB) -DST_THREADS \
+ -lxseg -lst -lcrypto
install:
install -d $(DESTDIR)$(bindir)
done
clean:
- rm -f filed xseg sosd vlmcd mapperd mt-sosd dummy monitor mt-mapperd \
- pfiled vlmc-xseg st-vlmcd mt-vlmcd mt-pfiled bench
+ rm -f xseg sosd vlmcd mapperd archip-sosd monitor archip-mapperd \
+ pfiled vlmc-xseg archip-vlmcd archip-filed archip-bench \
+ archip-dummy