Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
HR_Socket_Msg_Demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马伊齐
HR_Socket_Msg_Demo
Commits
ad3e990b
Commit
ad3e990b
authored
Dec 19, 2023
by
马伊齐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加所有测试i的make 指令
parent
48383d8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
4 deletions
+84
-4
Makefile
Makefile
+84
-4
No files found.
Makefile
100644 → 100755
View file @
ad3e990b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment