This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
compilation/flap/questions/retrolixToX86_64/Makefile

27 lines
541 B
Makefile
Raw Permalink Normal View History

2023-12-31 15:32:46 +01:00
FLAP = ../../_build/default/src/flap.exe
TARGET = retrolix
main:
2023-12-31 18:34:17 +01:00
@echo make interpret
@echo make compilo
2023-12-31 20:03:10 +01:00
build:
@cd ../.. && dune build --display=quiet
interpret: build
2023-12-31 15:32:46 +01:00
@for f in $(wildcard *.$(TARGET)); do \
2023-12-31 15:40:23 +01:00
printf "%s: " $$f; \
2023-12-31 15:32:46 +01:00
./$(FLAP) -s $(TARGET) -d true -r true $$f; \
printf "\n"; \
done
2023-12-31 18:34:17 +01:00
2023-12-31 20:03:10 +01:00
compilo: build
2023-12-31 18:34:17 +01:00
@for f in $(wildcard *.$(TARGET)); do \
printf "%s: " $$f; \
2024-01-01 10:48:42 +01:00
./$(FLAP) -t x86-64 $$f && \
gcc -no-pie -o $${f%.*}.elf $${f%.*}.s runtime.c && \
2023-12-31 19:03:23 +01:00
./$${f%.*}.elf; \
2024-01-01 10:48:42 +01:00
rm $${f%.*}.s; \
2023-12-31 18:34:17 +01:00
printf "\n"; \
done