diff options
-rwxr-xr-x | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |