瀏覽代碼

add missing example Makefiles

Olivier Aumage 6 年之前
父節點
當前提交
ec16f5cf81

+ 32 - 0
starpurm/dev/block_test/Makefile.example

@@ -0,0 +1,32 @@
+# StarPU --- Resource Management Layer.
+#
+# Copyright (C) 2017, 2018                               Inria
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+CFLAGS=-Wall -g
+
+CFLAGS+=$(shell pkg-config --cflags starpurm-1.3)
+LDFLAGS+=$(shell pkg-config --libs-only-L starpurm-1.3)
+LDLIBS += $(shell pkg-config --libs-only-l starpurm-1.3)
+
+.phony: all clean
+all: block_test
+%: %.c
+
+block_test: block_test.o
+	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+%.o: %.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+
+clean:
+	rm -fv block_test *.o

+ 31 - 0
starpurm/dev/chameleon_test/Makefile.example

@@ -0,0 +1,31 @@
+# StarPU --- Resource Management Layer.
+#
+# Copyright (C) 2017, 2018                               Inria
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+PRG=dgemm
+
+CC=icc
+CFLAGS=-Wall -g -O2
+LDLIBS=
+
+CFLAGS+=$(shell pkg-config --static --cflags chameleon) -I/home/aumage/Git/Chameleon/install/include/libhqr
+LDLIBS+=$(shell pkg-config --static --libs chameleon)
+
+CFLAGS+=$(shell pkg-config --cflags starpurm-1.3)
+LDLIBS += $(shell pkg-config --libs starpurm-1.3)
+
+.phony: all clean
+all: $(PRG)
+clean:
+	rm -f $(PRG) *.o

+ 37 - 0
starpurm/dev/cuda_vector_scale/Makefile.example

@@ -0,0 +1,37 @@
+# StarPU --- Resource Management Layer.
+#
+# Copyright (C) 2017, 2018                               Inria
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+NVCC=nvcc
+CFLAGS=-Wall -g
+CUFLAGS=-g
+
+CFLAGS+=$(shell pkg-config --cflags starpurm-1.3)
+CUFLAGS+=$(shell pkg-config --cflags starpurm-1.3)
+LDFLAGS+=$(shell pkg-config --libs-only-L starpurm-1.3)
+LDLIBS += $(shell pkg-config --libs-only-l starpurm-1.3)
+
+.phony: all clean
+all: vector_scale
+%: %.c
+
+vector_scale: vector_scale.o vs_cuda_kernel.o
+	$(NVCC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+%.o: %.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+%.o: %.cu
+	$(NVCC) $(CPPFLAGS) $(CUFLAGS) -c -o $@ $<
+
+clean:
+	rm -fv vector_scale *.o