ncurses template

This commit is contained in:
2025-11-26 17:57:34 +02:00
parent 2cd9455f7e
commit c524ece546
5 changed files with 225 additions and 14 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
CFLAGS := -ggdb -Wall -pedantic
CFLAGS := -ggdb -Wall -pedantic -lcurses
SRC_DIR := src
OBJ_DIR := src/obj
@@ -7,9 +7,15 @@ BIN_DIR := bin
SRCS := $(wildcard $(SRC_DIR)/*.c)
OBJS := $(SRCS:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
UI_SRCS := $(wildcard $(SRC_DIR)/ui/*.c $(SRC_DIR)/ui/**/*.c)
OBJS += $(UI_SRCS:$(SRC_DIR)/ui/%.c=$(OBJ_DIR)/ui/%.o)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(SRC_DIR)/main.h
$(CC) $(CFLAGS) -c $< -o $@
$(OBJ_DIR)/ui/%.o: $(SRC_DIR)/ui/%.c $(SRC_DIR)/ui/%.h
$(CC) $(CFLAGS) -c $< -o $@
bbs-client: $(OBJS)
$(CC) $(CFLAGS) $^ -o $(BIN_DIR)/$@
@@ -21,7 +27,7 @@ deps.mk: $(SRCS)
$(CC) -MM $^ > $(SRC_DIR)/$@
clean:
rm -f $(OBJ_DIR)/*.o $(BIN_DIR)/bbs-client
rm -f $(OBJ_DIR)/*.o $(OBJ_DIR)/**/*.o $(BIN_DIR)/bbs-client
run:
$(BIN_DIR)/bbs-client