wangzhengquan
2020-07-07 082633f08aae8eea19bd7050cbe4a75e5ed1ac6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# 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
# PLATFORM=$(shell $(ROOT)/systype.sh)
# include $(ROOT)/Make.defines.$(PLATFORM)
 
 
# PROGS =    test_queue productor consumer single_productor single_consumer
         
 
    
 
# all: $(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)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h  $(ROOT)/squeue/include/QFactory.h  $(LIBSQUEUE) $(LIBCOMMON)
 
 
# 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)
 
# clean:
#     rm -f $(PROGS) $(TEMPFILES) *.o
 
 
 
#
# Makefile for common library.
#
ROOT=..
#LDLIBS+=-Wl,-rpath=$(ROOT)/common:$(ROOT)/lib/jsoncpp
# 开源工具包路径
LDDIR += -L$(ROOT)/squeue
# 开源工具包
LDLIBS += -lsqueue -lpthread
 
INCLUDE += -I$(ROOT)/squeue/ -I$(ROOT)/squeue/include
 
PLATFORM=$(shell $(ROOT)/systype.sh)
include $(ROOT)/Make.defines.$(PLATFORM)
 
 
PROGS =    test_queue
 
 
build: $(PROGS)
 
    
 
# test1: $(LIBCOMMON)
 
# 如果包A 引用包B, B 要放在 A 后面
 
 
test_queue: test.h  $(ROOT)/squeue/include/lock_free_queue.h
 
 
productor: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h
 
 
consumer: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h
 
 
single_productor: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h
 
single_consumer: test.h  $(ROOT)/squeue/include/SArrayLockFreeQueue.h $(ROOT)/squeue/include/SLinkedLockFreeQueue.h $(ROOT)/squeue/include/QFactory.h
 
clean:
    rm -f $(TEMPFILES) $(PROGS)
 
 
 
$(LIBSQUEUE):
    (cd $(ROOT)/squeue && $(MAKE))