mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
bb981b953f
The MCAS suite, previously released as lock-free library, under a non-restrictive license. This software includes software previously released in 2003 under a GPL license, but released by the original copyright holder, Keir Fraser, under a BSD license, on 5/28/2008. Reviewed-on: http://gerrit.openafs.org/183 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
98 lines
2.7 KiB
Makefile
98 lines
2.7 KiB
Makefile
|
|
ARCH := SPARC
|
|
DEBUGGING := -DNDEBUG
|
|
|
|
ifeq ($(ARCH),INTEL)
|
|
CC := gcc
|
|
CFLAGS := -O3 -DINTEL -fomit-frame-pointer -march=i686
|
|
LDFLAGS := -lpthread
|
|
endif
|
|
|
|
ifeq ($(ARCH),PPC)
|
|
CC := cc_r
|
|
CFLAGS := -O3 -DPPC -q64 -w
|
|
LDFLAGS := -lpthread -q64
|
|
ASFLAGS := -a64
|
|
endif
|
|
|
|
ifeq ($(ARCH),IA64)
|
|
CC := gcc
|
|
CFLAGS := -O3 -DIA64 -fomit-frame-pointer
|
|
LDFLAGS := -lpthread
|
|
endif
|
|
|
|
ifeq ($(ARCH),MIPS)
|
|
CC := gcc
|
|
CFLAGS := -O3 -DMIPS -fomit-frame-pointer
|
|
LDFLAGS := -lpthread
|
|
endif
|
|
|
|
ifeq ($(ARCH),SPARC)
|
|
CC := /opt/SUNWspro/bin/cc
|
|
CFLAGS := -xO3 -DSPARC sparc_mcas.il -xarch=v9b
|
|
LDFLAGS := -DSPARC sparc_mcas.il -xarch=v9b -lthread -lrt
|
|
endif
|
|
|
|
ifeq ($(ARCH),ALPHA)
|
|
CC := cc
|
|
CFLAGS := -accept vaxc_keywords -O3 -DALPHA
|
|
CFLAGS += -fomit-frame-pointer -DWEAK_MEM_ORDER
|
|
LDFLAGS := -lpthread
|
|
endif
|
|
|
|
CFLAGS += $(DEBUGGING)
|
|
COMMON_DEPS += Makefile $(wildcard *.h)
|
|
|
|
GC_HARNESS_TARGETS := skip_lock_perlist skip_lock_pernode skip_lock_perpointer
|
|
GC_HARNESS_TARGETS += skip_cas skip_mcas
|
|
|
|
GC_HARNESS_TARGETS += bst_lock_fraser bst_lock_manber bst_lock_kung
|
|
GC_HARNESS_TARGETS += bst_mcas
|
|
|
|
GC_HARNESS_TARGETS += rb_lock_concurrentwriters rb_lock_serialisedwriters
|
|
GC_HARNESS_TARGETS += rb_lock_mutex
|
|
|
|
TARGETS := $(GC_HARNESS_TARGETS)
|
|
TARGETS += rb_stm_fraser rb_stm_herlihy rb_stm_lock
|
|
TARGETS += skip_stm_fraser skip_stm_herlihy skip_stm_lock
|
|
|
|
all: $(TARGETS) replay
|
|
|
|
clean:
|
|
rm -f $(TARGETS) replay *~ core *.o *.a
|
|
|
|
replay: %: %.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -c -o $(patsubst %.c,%.o,$<) $<
|
|
$(CC) -o $@ $(patsubst %.c,%.o,$<) $(LDFLAGS)
|
|
|
|
tree_mcas.o: tree_mcas.c mcas.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
skip_lock_perpointer.o: skip_lock.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -DTINY_MTX -c -o $@ $<
|
|
skip_lock_pernode.o: skip_lock.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
skip_lock_perlist.o: skip_lock.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -DFAT_MTX -c -o $@ $<
|
|
skip_mcas.o: skip_mcas.c mcas.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
%.o: %.c $(COMMON_DEPS)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
skip_stm_lock: skip_stm.o stm_lock.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
skip_stm_fraser: skip_stm.o stm_fraser.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
skip_stm_herlihy: skip_stm.o stm_herlihy.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
rb_stm_lock: rb_stm.o stm_lock.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
rb_stm_fraser: rb_stm.o stm_fraser.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
rb_stm_herlihy: rb_stm.o stm_herlihy.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
$(GC_HARNESS_TARGETS): %: %.o set_harness.o ptst.o gc.o
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|