Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / mcas / Makefile.mcas
blobc6f64bb7e7035c25d171fd4c9ae12ceddd5a5d9b
2 ARCH      := SPARC
3 DEBUGGING := -DNDEBUG
5 ifeq ($(ARCH),INTEL)
6 CC          := gcc
7 CFLAGS      := -O3 -DINTEL -fomit-frame-pointer -march=i686
8 LDFLAGS     := -lpthread
9 endif
11 ifeq ($(ARCH),PPC)
12 CC          := cc_r
13 CFLAGS      := -O3 -DPPC -q64 -w
14 LDFLAGS     := -lpthread -q64
15 ASFLAGS     := -a64
16 endif
18 ifeq ($(ARCH),IA64)
19 CC          := gcc
20 CFLAGS      := -O3 -DIA64 -fomit-frame-pointer
21 LDFLAGS     := -lpthread
22 endif
24 ifeq ($(ARCH),MIPS)
25 CC          := gcc
26 CFLAGS      := -O3 -DMIPS -fomit-frame-pointer
27 LDFLAGS     := -lpthread
28 endif
30 ifeq ($(ARCH),SPARC)
31 CC          := /opt/SUNWspro/bin/cc
32 CFLAGS      := -xO3 -DSPARC sparc_mcas.il -xarch=v9b
33 LDFLAGS     := -DSPARC sparc_mcas.il -xarch=v9b -lthread -lrt
34 endif
36 ifeq ($(ARCH),ALPHA)
37 CC          := cc
38 CFLAGS      := -accept vaxc_keywords -O3 -DALPHA
39 CFLAGS      += -fomit-frame-pointer -DWEAK_MEM_ORDER
40 LDFLAGS     := -lpthread 
41 endif
43 CFLAGS      += $(DEBUGGING)
44 COMMON_DEPS += Makefile $(wildcard *.h)
46 GC_HARNESS_TARGETS := skip_lock_perlist skip_lock_pernode skip_lock_perpointer
47 GC_HARNESS_TARGETS += skip_cas skip_mcas
49 GC_HARNESS_TARGETS += bst_lock_fraser bst_lock_manber bst_lock_kung
50 GC_HARNESS_TARGETS += bst_mcas
52 GC_HARNESS_TARGETS += rb_lock_concurrentwriters rb_lock_serialisedwriters
53 GC_HARNESS_TARGETS += rb_lock_mutex
55 TARGETS    := $(GC_HARNESS_TARGETS)
56 TARGETS    += rb_stm_fraser rb_stm_herlihy rb_stm_lock
57 TARGETS    += skip_stm_fraser skip_stm_herlihy skip_stm_lock
59 all: $(TARGETS) replay
61 clean:
62         rm -f $(TARGETS) replay *~ core *.o *.a
64 replay: %: %.c $(COMMON_DEPS)
65         $(CC) $(CFLAGS) -c -o $(patsubst %.c,%.o,$<) $<
66         $(CC) -o $@ $(patsubst %.c,%.o,$<) $(LDFLAGS)
68 tree_mcas.o: tree_mcas.c mcas.c $(COMMON_DEPS)
69         $(CC) $(CFLAGS) -c ${srcdir}/tree_mcas.c
70 skip_lock_perpointer.o: skip_lock.c $(COMMON_DEPS)
71         $(CC) $(CFLAGS) -DTINY_MTX -c -o skip_lock_perpointer.o ${srcdir}/skip_lock.c
72 skip_lock_pernode.o: skip_lock.c $(COMMON_DEPS)
73         $(CC) $(CFLAGS) -c -o skip_lock_pernode.o ${srcdir}/skip_lock.c
74 skip_lock_perlist.o: skip_lock.c $(COMMON_DEPS)
75         $(CC) $(CFLAGS) -DFAT_MTX -c -o skip_lock_perlist.o ${srcdir}/skip_lock.c
76 skip_mcas.o: skip_mcas.c mcas.c $(COMMON_DEPS)
77         $(CC) $(CFLAGS) -c ${srcdir}/skip_mcas.c
79 %.o: %.c $(COMMON_DEPS)
80         $(CC) $(CFLAGS) -c -o $@ $<
82 skip_stm_lock: skip_stm.o stm_lock.o set_harness.o ptst.o gc.o
83         $(CC) -o $@ $^ $(LDFLAGS)
84 skip_stm_fraser: skip_stm.o stm_fraser.o set_harness.o ptst.o gc.o
85         $(CC) -o $@ $^ $(LDFLAGS)
86 skip_stm_herlihy: skip_stm.o stm_herlihy.o set_harness.o ptst.o gc.o
87         $(CC) -o $@ $^ $(LDFLAGS)
89 rb_stm_lock: rb_stm.o stm_lock.o set_harness.o ptst.o gc.o
90         $(CC) -o $@ $^ $(LDFLAGS)
91 rb_stm_fraser: rb_stm.o stm_fraser.o set_harness.o ptst.o gc.o
92         $(CC) -o $@ $^ $(LDFLAGS)
93 rb_stm_herlihy: rb_stm.o stm_herlihy.o set_harness.o ptst.o gc.o
94         $(CC) -o $@ $^ $(LDFLAGS)
96 $(GC_HARNESS_TARGETS): %: %.o set_harness.o ptst.o gc.o
97         $(CC) -o $@ $^ $(LDFLAGS)