From 97c1685def13be3724a6d025f4e12f236777a911 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Sat, 17 Oct 2020 15:17:24 -0400 Subject: Cleanup `extra.h` for pairs and add option to use that in DIS build Also remove some unused code from the cleanupSemaphores utility --- dis/Makefile | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'dis') diff --git a/dis/Makefile b/dis/Makefile index 7f3da39..957a39a 100755 --- a/dis/Makefile +++ b/dis/Makefile @@ -1,8 +1,18 @@ +# Copyright 2020 Joshua Bakita +# Build the DIS benchmarks with all-pairs or unpaired instrumentation +# (I know that this Makefile is mildly evil and breaks so many rules +# that a good Makefile should follow. Sorry - at least I have one.) LIBLITMUS ?= /media/speedy/litmus/liblitmus CC ?= gcc -override CFLAGS += -pthread -O2 -ggdb3 -I../baseline/source +override CFLAGS += -pthread -O2 LDFLAGS = -lrt -lm -COMMON = ../baseline/source/extra.h + +# We need a different include path depending on the target, so use a +# target-specific variable +field matrix neighborhood pointer transitive update random_walk: override CFLAGS += -I../baseline/source +field matrix neighborhood pointer transitive update random_walk: COMMON = ../baseline/source/extra.h +field_all matrix_all neighborhood_all pointer_all transitive_all update_all: override CFLAGS += -I../all_pairs/source +field_all matrix_all neighborhood_all pointer_all transitive_all update_all: COMMON = ../all_pairs/source/extra.h # Handle cases where we're also profiling with the MMDC on the i.MX6Q ifneq ($(shell grep "define MMDC 1" ../baseline/source/extra.h),) @@ -15,12 +25,13 @@ ifneq ($(shell grep "define LITMUS 1" ../baseline/source/extra.h),) LDFLAGS += -L${LIBLITMUS} -llitmus endif - -all: field matrix neighborhood pointer transitive update random_walk +all: +baseline: field matrix neighborhood pointer transitive update random_walk +pairs: field_all matrix_all neighborhood_all pointer_all transitive_all update_all .PHONY: clean clean: - rm field matrix neighborhood pointer transitive update random_walk + rm field_all matrix_all neighborhood_all pointer_all transitive_all update_all field matrix neighborhood pointer transitive update random_walk field: ${COMMON} ./Field/field.c $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) @@ -36,3 +47,16 @@ update: ${COMMON} ./Update/update.c $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) random_walk: ${COMMON} random_walk.c $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) + +field_all: ${COMMON} ./Field/field.c + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) +matrix_all: ${COMMON} ./Matrix/ver2/matrix.c + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) +neighborhood_all: ${COMMON} ./Neighborhood/neighborhood.c + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) +pointer_all: ${COMMON} ./Pointer/pointer.c + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) +transitive_all: ${COMMON} ./Transitive/transitive.c + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) +update_all: ${COMMON} ./Update/update.c + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -- cgit v1.2.2