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