wangzhengquan
2020-10-13 d6a27f15acd08e99841595cece2b3e3e8045491a
test/Makefile
@@ -1,39 +1,39 @@
#
# Makefile for common library.
#
ROOT=..
LDLIBS+=-Wl,-rpath=$(ROOT)/queue:$(ROOT)/lib
# 开源工具包路径
LDDIR += -L$(ROOT)/queue
# 开源工具包
LDLIBS += -lshm_queue -lusgcommon -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 test_lockfree_queue
#RPATH += -Wl,-rpath=${ROOT}/lib
# 开源工具包路径
LDDIR += -L${DEST}/lib
# 开源工具包
LDLIBS += -lshm_queue -lusgcommon -lpthread
INCLUDES += -I${DEST}/include/shmqueue -I$(ROOT)/include/usgcommon
build: $(PROGS)
PROGS = ${DEST}/is_little_endian
# test1: $(LIBCOMMON)
DEPENDENCES = $(patsubst %, %.d, $(PROGS))
# 如果包A 引用包B, B 要放在 A 后面
#LIBCOMMON=${ROOT}/lib/libusgcommon.a
test_queue: test.h  $(ROOT)/queue/include/lock_free_queue.h
build:    $(PROGS)
single_productor: test.h  $(ROOT)/queue/include/lock_free_queue.h
single_consumer: test.h  $(ROOT)/queue/include/lock_free_queue.h
# class
#$(DEST)/kucker : kucker.c
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))