From 87b5445e2a08a18bbbe1e0ce63d5f65e81bfb79f Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 18 一月 2021 15:09:30 +0800
Subject: [PATCH] update
---
test/Makefile | 48 +++++++++++++++++++++++-------------------------
1 files changed, 23 insertions(+), 25 deletions(-)
diff --git a/test/Makefile b/test/Makefile
index 4b17f01..c490f5e 100755
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,39 +1,37 @@
-#
-# Makefile for common library.
-#
-ROOT=..
-#LDLIBS+=-Wl,-rpath=$(ROOT)/common:$(ROOT)/lib/jsoncpp
-# 寮�婧愬伐鍏峰寘璺緞
-LDDIR += -L$(ROOT)/queue
-# 寮�婧愬伐鍏峰寘
-LDLIBS += -lshm_queue -lpthread
-INCLUDE += -I$(ROOT)/queue/ -I$(ROOT)/queue/include
-
+ROOT := ..
PLATFORM=$(shell $(ROOT)/systype.sh)
include $(ROOT)/Make.defines.$(PLATFORM)
-
-PROGS = test_queue single_productor single_consumer multiple_queue_productor multiple_queue_consumer test_timeout test_lostdata
+RPATH += -Wl,-rpath=$(ROOT)/lib:$(DEST)/lib
+# 寮�婧愬伐鍏峰寘璺緞
+LDDIR += -L$(DEST)/lib
+#-lusgcommon
+# 寮�婧愬伐鍏峰寘
+LDLIBS += -lshm_queue -lpthread -lusgcommon
+
+#-I$(ROOT)/include/usgcommon
+INCLUDES += -I${ROOT}/src -I${ROOT}/src/shm -I${ROOT}/src/queue -I${ROOT}/src/socket -I${ROOT}/include/usgcommon
+
+PROGS = ${DEST}/test_sem
+
+DEPENDENCES = $(patsubst %, %.d, $(PROGS))
+
+#LIBCOMMON=${ROOT}/lib/libusgcommon.a
build: $(PROGS)
-
-# test1: $(LIBCOMMON)
-
-# 濡傛灉鍖匒 寮曠敤鍖匓锛� B 瑕佹斁鍦� A 鍚庨潰
-test_queue: test.h $(ROOT)/queue/include/lock_free_queue.h
-
-single_productor: test.h $(ROOT)/queue/include/lock_free_queue.h
-
-single_consumer: test.h $(ROOT)/queue/include/lock_free_queue.h
clean:
- rm -f $(TEMPFILES) $(PROGS)
+ rm -f $(PROGS) $(DEPENDENCES) $(TEMPFILES)
+
+# $(LIBCOMMON):
+# @(cd $(ROOT)/common && $(MAKE))
+
+-include $(DEPENDENCES)
+include $(ROOT)/Make.common.inc
-$(LIBQUEUE):
- (cd $(ROOT)/queue && $(MAKE))
--
Gitblit v1.8.0