Add meta-files, board structure, and alloc function
Adds meta-files such as the Makefile and flake.lock/nix for easier project management. Adds board structure in connect4.h, as well as some helper functions such as the make_board function to create a board, and the print_board function to view the board after creation.
This commit is contained in:
commit
cc107f975c
6 changed files with 152 additions and 0 deletions
14
Makefile
Normal file
14
Makefile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
CC = gcc
|
||||
CFLAGS = -g -Wall -pedantic
|
||||
|
||||
connect4.c main.c: connect4.h
|
||||
|
||||
TARGET = connect4
|
||||
CFILES = main.c connect4.c
|
||||
OFILES = ${CFILES:.c=.o}
|
||||
|
||||
all: ${OFILES}
|
||||
$(CC) $(CFLAGS) -o ${TARGET} ${OFILES}
|
||||
|
||||
clean:
|
||||
rm -r ${TARGET} ${OFILES}
|
||||
Loading…
Add table
Add a link
Reference in a new issue