summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--main.c6
-rw-r--r--snake.c1
-rw-r--r--snake.h0
4 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..027c0c6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+TARGET := snake
+
+SRC = $(wildcard *.c)
+OBJ = $(patsubst %.c, %.o, $(SRC))
+
+CC := gcc
+
+CFLAGS := -Wall -Wextra -Werror -pedantic -std=c99 -g
+LDFLAGS :=
+
+$(TARGET): $(OBJ)
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
+
+%.o:%.c
+ $(CC) -c $(CFLAGS) $<
+
+.PHONY: clean
+clean:
+ rm -rv $(TARGET) $(OBJ)
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..6cc468f
--- /dev/null
+++ b/main.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+ printf("Hello, world!\n");
+ return 0;
+}
diff --git a/snake.c b/snake.c
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/snake.c
@@ -0,0 +1 @@
+
diff --git a/snake.h b/snake.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/snake.h