1 CXXFLAGS = -g -MMD -Wall -I. -I./rpc
2 LDFLAGS = -L. -L/usr/local/lib
4 LDLIBS += $(shell test -f `gcc -print-file-name=librt.so` && echo -lrt)
5 LDLIBS += $(shell test -f `gcc -print-file-name=libdl.so` && echo -ldl)
9 all: lock_demo lock_server lock_tester rsm_tester rpc/rpctest
11 rpc/librpc.a: rpc/rpc.o rpc/connection.o rpc/pollmgr.o rpc/thr_pool.o rpc/jsl_log.o gettime.o
16 rpc/rpctest: rpc/rpctest.o rpc/librpc.a
18 lock_demo=lock_demo.o lock_client.o
19 lock_demo : $(lock_demo) rpc/librpc.a
21 lock_tester=lock_tester.o lock_client.o mutex.o tprintf.o rsm_client.o handle.o lock_client_cache_rsm.o
22 lock_tester : $(lock_tester) rpc/librpc.a
24 lock_server=lock_server.o lock_smain.o mutex.o tprintf.o handle.o rsm.o paxos.o config.o log.o lock_server_cache_rsm.o
25 lock_server : $(lock_server) rpc/librpc.a
27 rsm_tester=rsm_tester.o rsmtest_client.o
28 rsm_tester: $(rsm_tester) rpc/librpc.a
31 $(CXX) $(CXXFLAGS) -c $< -o $@
36 clean_files=rpc/rpctest rpc/*.o *.d rpc/*.d rpc/librpc.a *.o lock_server lock_tester lock_demo rsm_tester