From 8b89e81b09adbb06f6e5e64aa115a1eef6e75b57 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 30 十一月 2020 11:10:15 +0800
Subject: [PATCH] update

---
 test/Makefile |   62 ++++++++++++-------------------
 1 files changed, 24 insertions(+), 38 deletions(-)

diff --git a/test/Makefile b/test/Makefile
index f20ab24..7046699 100755
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,53 +1,39 @@
-ROOT=..
-EXTRALIBS+=
-INCLUDE+=-I. -I$(ROOT)/squeue/include -I$(ROOT)/squeue -I$(ROOT)/common/include 
-LIBCOMMON=$(ROOT)/common/libusgcommon.a
-LIBSQUEUE=$(ROOT)/squeue/libsqueue.a
-LDLIBS = -lpthread
+
+ROOT := ..
 PLATFORM=$(shell $(ROOT)/systype.sh)
 include $(ROOT)/Make.defines.$(PLATFORM)
 
+#RPATH += -Wl,-rpath=${ROOT}/lib
+# 寮�婧愬伐鍏峰寘璺緞
+LDDIR += -L${DEST}/lib
 
-PROGS =	test_queue productor consumer single_productor single_consumer
-	     
+# 寮�婧愬伐鍏峰寘
+LDLIBS += -lshm_queue -lusgcommon -lpthread
 
-	
-
-all: $(PROGS) 
-
-# test1: $(LIBCOMMON)
-
-# 濡傛灉鍖匒 寮曠敤鍖匓锛� B 瑕佹斁鍦� A 鍚庨潰
-# svshm_reader:  binary_sems.c  $(LIBSQUEUE) $(LIBCOMMON)
-
-# svshm_writer:  binary_sems.c  $(LIBSQUEUE) $(LIBCOMMON)
-
-test_queue: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h  $(ROOT)/squeue/include/QFactory.h  $(LIBSQUEUE) $(LIBCOMMON)
+INCLUDES += -I${DEST}/include/shmqueue -I$(ROOT)/include/usgcommon
 
 
-productor: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h  $(LIBSQUEUE) $(LIBCOMMON)
+PROGS = ${DEST}/test test2
+
+DEPENDENCES = $(patsubst %, %.d, $(PROGS)) 
+
+#LIBCOMMON=${ROOT}/lib/libusgcommon.a
+
+build:	 $(PROGS)
 
 
-consumer: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h $(LIBSQUEUE) $(LIBCOMMON)
+# class
+#$(DEST)/kucker : kucker.c
 
-
-single_productor: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h  $(LIBSQUEUE) $(LIBCOMMON)
-
-single_consumer: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h $(LIBSQUEUE) $(LIBCOMMON)
-# test_lostdata: test.h  $(LIBSQUEUE) $(LIBCOMMON)
-
-# consumer_timeout: $(ROOT)/squeue/include/squeue.h test.h  $(LIBSQUEUE) $(LIBCOMMON)
-
-# productor_timeout: $(ROOT)/squeue/squeue.h $(LIBSQUEUE) $(LIBCOMMON)
-
-# test_atomic: $(ROOT)/squeue/squeue.h $(LIBSQUEUE) $(LIBCOMMON)
 
 clean:
-	rm -f $(PROGS) $(TEMPFILES) *.o
+	rm -f $(PROGS) $(DEPENDENCES) $(TEMPFILES)
+
+# $(LIBCOMMON):
+# 	@(cd $(ROOT)/common && $(MAKE))
+
+-include $(DEPENDENCES)
+include $(ROOT)/Make.common.inc
 
 
-$(LIBCOMMON):
-	(cd $(ROOT)/common && $(MAKE))
 
-$(LIBSQUEUE):
-	(cd $(ROOT)/squeue && $(MAKE))

--
Gitblit v1.8.0