aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/heapsort/Makefile
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-01-19 19:17:46 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-01-19 19:17:46 +0100
commit0fb339fd9dc30b997c76563271e9b3e3f24db84d (patch)
tree18e593d2fa17de903cc698b93176a1578fa89d6e /test/monniaux/heapsort/Makefile
parentd70a9e55c3595cf7ee84ca9f3b1d5e272a5e3999 (diff)
downloadcompcert-kvx-0fb339fd9dc30b997c76563271e9b3e3f24db84d.tar.gz
compcert-kvx-0fb339fd9dc30b997c76563271e9b3e3f24db84d.zip
some more example
Diffstat (limited to 'test/monniaux/heapsort/Makefile')
-rw-r--r--test/monniaux/heapsort/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/monniaux/heapsort/Makefile b/test/monniaux/heapsort/Makefile
new file mode 100644
index 00000000..47dac2bb
--- /dev/null
+++ b/test/monniaux/heapsort/Makefile
@@ -0,0 +1,40 @@
+CFLAGS=-Wall -O3
+K1C_CC=k1-mbr-gcc
+K1C_CFLAGS=-Wall -O3 -std=c99
+K1C_CCOMP=../../../ccomp
+K1C_CCOMPFLAGS=-Wall -O3 -D__thread= -D__int128=int
+
+PRODUCTS=heapsort.host heapsort.gcc.k1c.out heapsort.ccomp.k1c.out heapsort.ccomp.k1c.s heapsort.gcc.k1c.s heapsort.gcc.k1c heapsort.ccomp.k1c
+
+all: $(PRODUCTS)
+
+%.gcc.k1c.s: %.c
+ $(K1C_CC) $(K1C_CFLAGS) -S $< -o $@
+
+%.gcc.k1c.o: %.gcc.k1c.s
+ $(K1C_CC) $(K1C_CFLAGS) -c $< -o $@
+
+%.ccomp.k1c.s: %.c
+ $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@
+
+%.ccomp.k1c.o: %.ccomp.k1c.s
+ $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@
+
+heapsort.host: heapsort.c heapsort_run.c heapsort.h
+ $(CC) $(CFLAGS) heapsort.c heapsort_run.c -o $@
+
+heapsort.gcc.k1c.s heapsort.ccomp.k1c.s heapsort_run.gcc.k1c.s: heapsort.h
+
+heapsort.gcc.k1c: heapsort.gcc.k1c.o heapsort_run.gcc.k1c.o
+ $(K1C_CC) $(K1C_CFLAGS) $+ -o $@
+
+heapsort.ccomp.k1c: heapsort.ccomp.k1c.o heapsort_run.gcc.k1c.o
+ $(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@
+
+%.k1c.out: %.k1c
+ k1-cluster --cycle-based -- $< | tee $@
+
+clean:
+ $(RM) -f $(PRODUCTS) heapsort.gcc.k1c.o heapsort.ccomp.k1c.o heapsort_run.gcc.k1c.o heapsort_run.gcc.k1c.s
+
+.PHONY: clean