From ca312c023b11d7885227addc7564494998d8898c Mon Sep 17 00:00:00 2001
From: cheliequan <liequanche@126.com>
Date: 星期三, 28 十二月 2022 13:31:58 +0800
Subject: [PATCH] 更新ipc client库和使用示例

---
 src/Makefile |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index d870100..62eef2d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,11 +9,11 @@
 shmht: shmht.o memfd.o
 	$(CC) -o libshmht.so $(CFLAGS) -shared $^
 	$(AR) rcs libshmht.a  $^
-shmht.o: shmht.c shmht.h
+shmht.o: shmht.c
 	$(CC) $(CFLAGS) $(INCLUDE) -fPIC -c shmht.c
 shmht_mytests: shmht_mytests.o shmht.o memfd.o 
 	$(CC) $(CFLAGS) $(INCLUDE)   -L .  -pthread  -o $@ $^ 
-shmht_mytests.o: shmht.h
+shmht_mytests.o: 
 	$(CC) $(CFLAGS) $(INCLUDE) -fPIC -c shmht_mytests.c
 memfd.o:
 	$(CC) $(CFLAGS) $(INCLUDE) -fPIC -c memfd.c
@@ -21,7 +21,9 @@
 	$(CC) $(CFLAGS) $(INCLUDE) -fPIC -pthread -o $@ ipc_server.c -lipc_server -L .
 libipc_server.so:
 	$(CC) -shared -fPIC -o $@ ipc_server_lib.c ipc_msg.c memfd.c
-ipc_client:
-	$(CC) $(CFLAGS) $(INCLUDE) -fPIC -o $@ ipc_client.c ipc_msg.c memfd.c
+ipc_client:libipc_client.so
+	$(CC) $(CFLAGS) $(INCLUDE) -fPIC -o $@ ipc_client.c ipc_msg.c memfd.c -lipc_client -L .
+libipc_client.so:
+	$(CC) -shared -fPIC -o $@ ipc_client_lib.c ipc_msg.c memfd.c
 clean:
 	rm -rf *.so *.o a.out shmht_mytests *.a ipc_client ipc_server

--
Gitblit v1.8.0