wangzhengquan
2020-05-25 ff31a5b78ebe4b4348ed7fd572941b23a87414c2
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
ROOT=..
EXTRALIBS+=
INCLUDE+=-I$(ROOT)/common/include -I$(ROOT)/squeue/include
LIBCOMMON=$(ROOT)/common/libusgcommon.a
LIBSQUEUE=$(ROOT)/squeue/libsqueue.a
# LDLIBS =-L$(ROOT)/squeue -lsqueue -L$(ROOT)/common -lcommon $(EXTRALIBS)
PLATFORM=$(shell $(ROOT)/systype.sh)
include $(ROOT)/Make.defines.$(PLATFORM)
 
 
PROGS =    test_queue productor consumer test_cas test_lostdata consumer_timeout
    
 
all: $(PROGS) 
 
test1: $(LIBCOMMON)
 
# 如果包A 引用包B, B 要放在 A 后面
# svshm_reader:  binary_sems.c  $(LIBSQUEUE) $(LIBCOMMON)
 
# svshm_writer:  binary_sems.c  $(LIBSQUEUE) $(LIBCOMMON)
 
test_queue: $(ROOT)/squeue/include/squeue.h  test.h $(LIBSQUEUE) $(LIBCOMMON)
 
 
productor: productor.c $(ROOT)/squeue/include/squeue.h test.h $(LIBSQUEUE) $(LIBCOMMON)
 
 
consumer: $(ROOT)/squeue/include/squeue.h test.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
 
 
$(LIBCOMMON):
    (cd $(ROOT)/common && $(MAKE))
 
$(LIBSQUEUE):
    (cd $(ROOT)/squeue && $(MAKE))