wangzhengquan
2021-01-18 24641678c68b5eadafa49c9341c7fcbfcff28262
test/Makefile
@@ -1,39 +1,37 @@
#
# 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 = communication
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)
# 如果包A 引用包B, 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))