aboutsummaryrefslogtreecommitdiff
path: root/basics/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-08-12 14:50:07 +0000
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-05 16:02:17 +0100
commit8e968078e6aee470a02bed7728100b2df1877e90 (patch)
tree8f64d8a0e8d8e7a9329a8239fd3c57ce217d5ff7 /basics/Makefile
parentc173df46a0a12fe52fdf13323f967e9117462096 (diff)
downloadfarga-8e968078e6aee470a02bed7728100b2df1877e90.tar.gz
farga-8e968078e6aee470a02bed7728100b2df1877e90.zip
basics: Add some examples on RISC-V assembly
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'basics/Makefile')
-rw-r--r--basics/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/basics/Makefile b/basics/Makefile
new file mode 100644
index 0000000..90e88ef
--- /dev/null
+++ b/basics/Makefile
@@ -0,0 +1,20 @@
+CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)ld
+CCFLAGS =
+EXE = basics
+
+DEBUG =
+ifneq ($(strip $(DEBUG)),)
+ CCFLAGS += -g
+endif
+
+.PHONY: all
+all: clean $(EXE)
+
+.PHONY: $(EXE)
+$(EXE):
+ gcc $(CCFLAGS) -o $(EXE) main.c factorial.S string.S
+
+.PHONY: clean
+clean:
+ @rm -f $(EXE)