wangzhengquan
2020-10-10 9ebe80228c7b7cb35ccaeaaa46ccf726bf71d6bd
demo/Makefile
@@ -1,28 +1,40 @@
#
# Makefile for common library.
#
ROOT=..
LDLIBS+=-Wl,-rpath=$(ROOT)/lib:$(ROOT)/build/lib
# 开源工具包路径
LDDIR += -L$(ROOT)/build/lib
# 开源工具包
LDLIBS += -lshm_queue -lusgcommon -lpthread
INCLUDE += -I$(ROOT)/build/include
ROOT := ..
PLATFORM=$(shell $(ROOT)/systype.sh)
include $(ROOT)/Make.defines.$(PLATFORM)
#RPATH += -Wl,-rpath=${ROOT}/lib
# 开源工具包路径
LDDIR += -L${DEST}/lib
PROGS = dgram_mod_req_rep dgram_mod_survey dgram_mod_bus
# 开源工具包
LDLIBS += -lshm_queue -lusgcommon -lpthread
INCLUDES += -I${DEST}/include/shmqueue -I$(ROOT)/include/usgcommon
build: $(PROGS)
PROGS = ${DEST}/dgram_mod_req_rep ${DEST}/dgram_mod_survey ${DEST}/dgram_mod_bus
# test1: $(LIBCOMMON)
DEPENDENCES = $(patsubst %, %.d, $(PROGS))
# 如果包A 引用包B, B 要放在 A 后面
#LIBCOMMON=${ROOT}/lib/libusgcommon.a
build:    $(PROGS)
# 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