aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/sandbox
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-07-12 14:45:38 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-07-12 14:45:38 +0200
commit5eb05f7f598621f0781900c21a9f210d74651f95 (patch)
tree867ad9098cf846ac0f73ad9cc6f6bfa72dcc6ca8 /test/monniaux/sandbox
parentb0e471b332fbc8607eee738677e4d5dd75bf1777 (diff)
downloadcompcert-kvx-5eb05f7f598621f0781900c21a9f210d74651f95.tar.gz
compcert-kvx-5eb05f7f598621f0781900c21a9f210d74651f95.zip
(#143) - Regrouping in obj/ asm/ bin/ directories
Diffstat (limited to 'test/monniaux/sandbox')
-rw-r--r--test/monniaux/sandbox/Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/monniaux/sandbox/Makefile b/test/monniaux/sandbox/Makefile
index f753b87c..fdb24685 100644
--- a/test/monniaux/sandbox/Makefile
+++ b/test/monniaux/sandbox/Makefile
@@ -63,23 +63,27 @@ firstrule: all
define gen_rules
.SECONDARY:
-%$(3).s: %.c
+asm/%$(3).s: %.c
+ @mkdir -p $$(@D)
$(1) $(2) -S $$< -o $$@
.SECONDARY:
-$(TARGET)$(3).bin: $(ALL_CFILES:.c=$(3).o) $(CLOCK)
+bin/$(TARGET)$(3).bin: $(addprefix obj/,$(ALL_CFILES:.c=$(3).o)) $(CLOCK)
+ @mkdir -p $$(@D)
$(K1C_CC) $$+ -lm -o $$@
-OUTFILES:=$(OUTFILES) $(TARGET)$(3).out
+OUTFILES:=$(OUTFILES) out/$(TARGET)$(3).out
FIRSTLINE:=$(FIRSTLINE), $(3)
endef
# Generic rules
-%.o: %.s
+obj/%.o: asm/%.s
+ @mkdir -p $(@D)
$(K1C_CC) $< -c -o $@
-%.out: %.bin
+out/%.out: bin/%.bin
+ @mkdir -p $(@D)
$(EXECUTE_CYCLES) $< | tee $@
##