aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/rules.mk')
-rw-r--r--test/monniaux/rules.mk37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/monniaux/rules.mk b/test/monniaux/rules.mk
new file mode 100644
index 00000000..11256bd3
--- /dev/null
+++ b/test/monniaux/rules.mk
@@ -0,0 +1,37 @@
+CCOMP=ccomp
+CCOMPFLAGS=-O3 -Wall
+CFLAGS= -std=c99 -O3 -Wall -Wextra -Werror=implicit
+K1C_CC=k1-mbr-gcc
+K1C_CFLAGS = -std=c99 -O3 -Wall -Wextra -Werror=implicit
+K1C_CCOMP = ../../../ccomp
+K1C_CCOMPFLAGS=-O3 -Wall
+
+%.host.gcc.o : %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+%.host.ccomp.o : %.c
+ $(CCOMP) $(CCOMPFLAGS) -c -o $@ $<
+
+%.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 $@
+
+%.gcc.host.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+%.ccomp.host.o: %.c
+ $(CCOMP) $(CCOMPFLAGS) -c $< -o $@
+
+%.k1c.out : %.k1c
+ k1-cluster --cycle-based -- $< |tee $@
+
+%.host.out : %.host
+ ./$< |tee $@