| | |
| | | # |
| | | # Makefile for common library. |
| | | # |
| | | 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 |
| | | LDLIBS+=-Wl,-rpath=$(ROOT)/queue:$(ROOT)/lib |
| | | # 开源工具包路径 |
| | | LDDIR += -L$(ROOT)/queue |
| | | # 开源工具包 |
| | | LDLIBS += -lshm_queue -lusgcommon -lpthread |
| | | |
| | | INCLUDE += -I$(ROOT)/queue/ -I$(ROOT)/queue/include |
| | | |
| | | PLATFORM=$(shell $(ROOT)/systype.sh) |
| | | include $(ROOT)/Make.defines.$(PLATFORM) |
| | | |
| | | |
| | | PROGS = communication |
| | | |
| | | PROGS = test_queue productor consumer single_productor single_consumer |
| | | |
| | | |
| | | |
| | | |
| | | all: $(PROGS) |
| | | build: $(PROGS) |
| | | |
| | | # test1: $(LIBCOMMON) |
| | | |
| | | # 如果包A 引用包B, B 要放在 A 后面 |
| | | # svshm_reader: binary_sems.c $(LIBSQUEUE) $(LIBCOMMON) |
| | | |
| | | |
| | | # svshm_writer: binary_sems.c $(LIBSQUEUE) $(LIBCOMMON) |
| | | test_queue: test.h $(ROOT)/queue/include/lock_free_queue.h |
| | | |
| | | test_queue: test.h $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h $(LIBSQUEUE) $(LIBCOMMON) |
| | | single_productor: test.h $(ROOT)/queue/include/lock_free_queue.h |
| | | |
| | | |
| | | productor: test.h $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h $(LIBSQUEUE) $(LIBCOMMON) |
| | | |
| | | |
| | | consumer: test.h $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h $(LIBSQUEUE) $(LIBCOMMON) |
| | | |
| | | |
| | | 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) |
| | | single_consumer: test.h $(ROOT)/queue/include/lock_free_queue.h |
| | | |
| | | clean: |
| | | rm -f $(PROGS) $(TEMPFILES) *.o |
| | | rm -f $(TEMPFILES) $(PROGS) |
| | | |
| | | |
| | | $(LIBCOMMON): |
| | | (cd $(ROOT)/common && $(MAKE)) |
| | | |
| | | $(LIBSQUEUE): |
| | | (cd $(ROOT)/squeue && $(MAKE)) |
| | | $(LIBQUEUE): |
| | | (cd $(ROOT)/queue && $(MAKE)) |