aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-04-11 18:29:10 +0300
committereug-vs <eugene@eug-vs.xyz>2022-04-11 18:29:10 +0300
commit7f0647e07b6a14e6f4a5ace6dbd4e688f424b8dd (patch)
treeaaa9ea964ccd0682ac3771fe979cc647c068e605
parent5fdb5f76f40a33a913cf2c02fdd67386e4c3552f (diff)
downloadcarcassonne-engine-c-7f0647e07b6a14e6f4a5ace6dbd4e688f424b8dd.tar.gz
chore: include tinfo lib and create obj dir
-rwxr-xr-xMakefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fa57919..879e5e6 100755
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC=tcc
-CFLAGS=-g -O2 -lncurses
+CFLAGS=-g -O2 -lncurses -ltinfo
SRC=src
OBJ=obj
SOURCES=$(wildcard $(SRC)/*.c)
@@ -15,9 +15,15 @@ build: $(BIN)
$(BIN): $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) -o $(BIN)
-$(OBJ)/%.o: $(SRC)/%.c $(SRC)/%.h
+$(OBJ)/$(BIN).o: $(SRC)/$(BIN).c $(OBJ)
$(CC) -c $< -o $@
+$(OBJ)/%.o: $(SRC)/%.c $(SRC)/%.h $(OBJ)
+ $(CC) -c $< -o $@
+
+$(OBJ):
+ mkdir -p $(OBJ)
+
clean:
rm -r $(BIN) $(OBJ)/*.o