diff options
| -rw-r--r-- | Makefile | 19 | ||||
| -rw-r--r-- | main.c | 6 | ||||
| -rw-r--r-- | snake.c | 1 | ||||
| -rw-r--r-- | snake.h | 0 |
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) @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main() { + printf("Hello, world!\n"); + return 0; +} @@ -0,0 +1 @@ + |
