Commit f2f03676 authored by 马伊齐's avatar 马伊齐

Add BIN_FOLDER target to Makefile

parent af273b1a
......@@ -130,12 +130,17 @@ MsgServer : sock_msg.o
@$(CC) -o $(OUT_DIR)/$@.out $(OBJ_DIR)/$@.o $(OBJ_DIR)/$<
# 编译库文件
sock_msg.o : $(LIB_DIR)/sock_msg.c $(LIB_DIR)/sock_msg.h
sock_msg.o : $(LIB_DIR)/sock_msg.c $(LIB_DIR)/sock_msg.h BIN_FOLDER
@if [ ! -d "$(OBJ_DIR)" ]; then \
mkdir obj; \
fi
@$(CC) -c $< -o $(OBJ_DIR)/$@
BIN_FOLDER:
@if [ ! -d "$(OUT_DIR)" ]; then \
mkdir $(OUT_DIR); \
fi
.PHONY: clean
clean:
-rm -rf $(OBJ_DIR)/*.o
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment