diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | CMakeLists.txt | 13 | ||||
| -rw-r--r-- | Makefile | 22 | 
3 files changed, 23 insertions, 14 deletions
@@ -1,3 +1,3 @@ -build +mazerator  .vscode  .cache diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 5847c70..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required(VERSION 3.0.0) - -set(CMAKE_EXPORT_COMPILE_COMMANDS 1) - -set(CMAKE_C_STANDARD 11) - -project(mazerator_project C) - -file(GLOB SOURCES src/*.c) - -add_executable(mazerator ${SOURCES}) - -SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wall) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..82c2f43 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CSTD=c17 +CFLAGS=-Wall -O2 --std=$(CSTD) +CDEBUGFLAGS=-Wall -g -O0 --std=$(CSTD) # -fno-stack-protector + +SRCDIR=src +SRCS=$(wildcard $(SRCDIR)/*.c) + +TARGET=mazerator + +.PHONY: debug clean + +all: $(TARGET) + +$(TARGET): $(SRCS) +	$(CC) $(CFLAGS) $(SRCS) -o $(TARGET) + +debug: +	$(CC) $(CDEBUGFLAGS) $(SRCS) -o $(TARGET) + +clean: +	$(RM) $(TARGET)  | 
