diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-09-13 21:12:18 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-09-13 21:12:18 +0300 |
commit | 7a4d16e5ebd45b15b0c4925894c25a81c2e135c6 (patch) | |
tree | 6b26532d97128a6bd2df8c0c5976f7a74f8fd861 /Makefile | |
download | j1chess-7a4d16e5ebd45b15b0c4925894c25a81c2e135c6.tar.gz |
chore: initialize project
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
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 + |