first commit

This commit is contained in:
Noah Swerhun 2021-09-17 20:35:57 -05:00
commit c479b42b33
9 changed files with 27 additions and 0 deletions

23
Makefile Normal file
View file

@ -0,0 +1,23 @@
CC = gcc
CFLAGS = -Wall -Wextra -pedantic-errors -std=c99 -Wno-format -lncurses
OUTFILE = nsnake
SRCDIR = src
OBJDIR = obj
INCDIR = src/include
SRC = $(wildcard $(SRCDIR)/*.c)
INC = $(wildcard $(INCDIR)/*.h)
_OBJ = $(SRC:.c=.o)
OBJ = $(subst $(SRCDIR),$(OBJDIR),$(_OBJ))
$(OUTFILE): $(OBJ)
$(CC) $(CFLAGS) -o $(OUTFILE) $(OBJ)
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(INCDIR)/%.h
@mkdir -p $(@D)
$(CC) $(CFLAGS) -o $@ -c $<
.PHONY: clean
clean:
-rm $(OUTFILE) $(OBJ)

0
src/apple.c Normal file
View file

0
src/include/apple.h Normal file
View file

0
src/include/main.h Normal file
View file

0
src/include/segment.h Normal file
View file

0
src/include/snake.h Normal file
View file

4
src/main.c Normal file
View file

@ -0,0 +1,4 @@
#include <stdio.h>
#include <stdlib.h>
#include "include/main.h"

0
src/segment.c Normal file
View file

0
src/snake.c Normal file
View file