From 7a4d16e5ebd45b15b0c4925894c25a81c2e135c6 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 13 Sep 2022 21:12:18 +0300 Subject: chore: initialize project --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8730842 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +CC=gcc +CFLAGS=-g -Ofast -fsanitize=address -static-libasan +SRC=src +OBJ=obj +SOURCES=$(wildcard $(SRC)/*.c) +OBJECTS=$(patsubst $(SRC)/%.c, $(OBJ)/%.o, $(SOURCES)) +BIN=main + + +run: $(BIN) + ./$(BIN) + +build: $(BIN) + +$(BIN): $(OBJECTS) + $(CC) $(CFLAGS) $(OBJECTS) -o $(BIN) + +$(OBJ)/%.o: $(SRC)/%.c $(SRC)/*.h + $(CC) -c $< -o $@ + +clean: + rm -r $(BIN) $(OBJ)/*.o + -- cgit v1.2.3