aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-03-29 00:23:59 +0300
committereug-vs <eugene@eug-vs.xyz>2022-03-29 00:23:59 +0300
commit5ed9b8981a1e37098a79411803c50e4cffade058 (patch)
treeed9ca421ad8a6a61c35b46331ee1b13fcf6f730a /Makefile
downloadcarcassonne-engine-c-5ed9b8981a1e37098a79411803c50e4cffade058.tar.gz
feat: initial commit
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100755
index 0000000..94e43d6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+CC=tcc
+CFLAGS=-g
+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
+