>From 955eefe8ad5a64fddd2e33b343ac3a1e171dd089 Mon Sep 17 00:00:00 2001 From: Akira Yokosawa <akiyks@xxxxxxxxx> Date: Sun, 9 Jul 2017 09:00:36 +0900 Subject: [PATCH 2/2] advsync: Add cross compilation targets Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- CodeSamples/advsync/herd/.gitignore | 5 +++++ CodeSamples/advsync/herd/Makefile | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CodeSamples/advsync/herd/.gitignore b/CodeSamples/advsync/herd/.gitignore index f47cb20..a01a568 100644 --- a/CodeSamples/advsync/herd/.gitignore +++ b/CodeSamples/advsync/herd/.gitignore @@ -1 +1,6 @@ *.out +/@all +/X86 +/PPC +/ARM +*.tar diff --git a/CodeSamples/advsync/herd/Makefile b/CodeSamples/advsync/herd/Makefile index 7959063..056f5f9 100644 --- a/CodeSamples/advsync/herd/Makefile +++ b/CodeSamples/advsync/herd/Makefile @@ -2,13 +2,33 @@ LITMUS := $(wildcard *.litmus) LITMUS_OUT = $(addsuffix .out,$(LITMUS)) CCOPTS = -fomit-frame-pointer -O2 CCOPTS += -I$(shell pwd) +CUSTOM_HEADER := $(wildcard *.h) -.PHONY: all clean +.PHONY: all clean cross-x86 cross-ppc cross-arm cross all: $(LITMUS_OUT) %.litmus.out: %.litmus litmus7 -r 1000 -carch X86 -ccopts "$(CCOPTS)" $< > $@ 2>&1 +cross-x86: TARGET = X86 +cross-x86: cross + +cross-ppc: TARGET = PPC +cross-ppc: cross + +cross-arm: TARGET = ARM +cross-arm: cross + +cross: + echo > @all + for l in $(LITMUS); do \ + echo $$l >> @all; \ + done + mkdir -p $(TARGET) + litmus7 -r 1000 -carch $(TARGET) -o $(TARGET) @all + cp $(CUSTOM_HEADER) $(TARGET) + clean: rm -f *.out + rm -f @all -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html