Browse Source

odin hello world init

221V 1 week ago
commit
d245ff694f
4 changed files with 55 additions and 0 deletions
  1. 13 0
      README.md
  2. 29 0
      comp.mk
  3. 3 0
      otest/Makefile
  4. 10 0
      otest/hellope.odin

+ 13 - 0
README.md

@@ -0,0 +1,13 @@
+# odin testing
+
+```
+> make o hellope
+odin run hellope.odin -file
+Hellope!
+
+
+
+> odin version
+odin version dev-2025-07:090cac62f
+```
+

+ 29 - 0
comp.mk

@@ -0,0 +1,29 @@
+
+
+# todo clean
+
+# make o hellope
+#  for
+# odin run hellope.odin -file
+
+o:
+	odin run $(filter-out $@,$(MAKECMDGOALS)).odin -file
+
+c:
+	odin run .
+
+c2:
+	odin build <dir>
+
+run:
+	./otest
+
+# ignore other - cause - make: *** No rule to make target 'hellope'.  Stop.
+%:
+	@:
+
+
+default: run
+
+.PHONY: c c2 run
+

+ 3 - 0
otest/Makefile

@@ -0,0 +1,3 @@
+
+include ../comp.mk
+

+ 10 - 0
otest/hellope.odin

@@ -0,0 +1,10 @@
+
+package main
+
+import "core:fmt"
+
+main :: proc(){
+  // hello world
+  fmt.println("Hellope!")
+}
+