Commit ad3e990b authored by 马伊齐's avatar 马伊齐

增加所有测试i的make 指令

parent 48383d8a
......@@ -20,21 +20,31 @@ SRCS := $(wildcard *.c)
# 指定Socket文件夹
SOCKET_DIR := socket
# 指定Socket注册注销文件夹
SOCKET_RE_UNRE_DIR := socket_re_unre
# 指定本地消息发送接收文件夹
MSG_LOCAL_SEND_RECV := msg_local_send_recv
# 指定信号发送接收文件夹
MSG_SIGNAL_SEND_RECV := msg_signal_send_recv
# 指定消息发送接收文件夹
MSG_SEND_RECV := msg_send_recv
# 测试Socket部分(除了注销注册外的)
socket : sock_msg.o SocketClient SocketServer
@chmod 777 $(OUT_DIR)/*.out
@./$(OUT_DIR)/SocketServer.out
SocketClient : sock_msg.o $(SOCKET_DIR)/SocketClient.c
SocketClient : sock_msg.o
@$(CC) -c $(SOCKET_DIR)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
SocketServer : sock_msg.o $(SOCKET_DIR)/SocketClient.c
SocketServer : sock_msg.o
@$(CC) -c $(SOCKET_DIR)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
......@@ -42,12 +52,82 @@ SocketServer : sock_msg.o $(SOCKET_DIR)/SocketClient.c
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
# 测试Socket注销注册部分
socketRe : sock_msg.o SocketReUnreClient SocketReUnreServer
@chmod 777 $(OUT_DIR)/*.out
@./$(OUT_DIR)/SocketReUnreServer.out
SocketReUnreClient : sock_msg.o
@$(CC) -c $(SOCKET_RE_UNRE_DIR)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
SocketReUnreServer : sock_msg.o
@$(CC) -c $(SOCKET_RE_UNRE_DIR)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
# 测试msg本地发送接收部分
MsgLocalSendRecv : sock_msg.o MsgLocalClient MsgLocalServer
@chmod 777 $(OUT_DIR)/*.out
@./$(OUT_DIR)/MsgLocalServer.out
MsgLocalClient : sock_msg.o
@$(CC) -c $(MSG_LOCAL_SEND_RECV)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
MsgLocalServer : sock_msg.o
@$(CC) -c $(MSG_LOCAL_SEND_RECV)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
# 测试msg发送接收信号部分
MsgPluse : sock_msg.o MsgSendPluseA MsgSendPluseB
@chmod 777 $(OUT_DIR)/*.out
@./$(OUT_DIR)/MsgSendPluseA.out
MsgSendPluseA : sock_msg.o
@$(CC) -c $(MSG_SIGNAL_SEND_RECV)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
MsgSendPluseB : sock_msg.o
@$(CC) -c $(MSG_SIGNAL_SEND_RECV)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
# 测试msg发送接收部分
Msg : sock_msg.o MsgClient MsgServer
@chmod 777 $(OUT_DIR)/*.out
@./$(OUT_DIR)/MsgLocalServer.out
MsgClient : sock_msg.o
@$(CC) -c $(msg_send_recv)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
MsgServer : sock_msg.o
@$(CC) -c $(msg_send_recv)/$@.c -o $(OBJ_DIR)/$@.o
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
# 编译库文件
sock_msg.o : $(LIB_DIR)/sock_msg.c $(LIB_DIR)/sock_msg.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment