1 Star 0 Fork 68

supanme / chatroom

forked from Sachs / chatroom 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Makefile 709 Bytes
Copy Edit Raw Blame History
Sachs authored 2013-05-29 14:29 . init
PLATFORM ?= $(shell uname)
CC = gcc
SRCS = main.c view.c server.c client.c
LIBS = -liup -lpthread
CFLAGS +=
SRC_DIR = ./src
BIN_DIR = ./bin
ifeq ($(findstring Linux,$(PLATFORM)),Linux)
EXE = .out
SRCS += socket_linux.c string_value_utf8.c
else
EXE = .exe
SRCS += socket_win32.c string_value_gbk.c
LIBS += -lmingw32 -lgdi32 -luser32 -lcomdlg32 \
-lcomctl32 -luuid -lole32 -lwsock32 -lkernel32 -mwindows
endif
OBJS = $(SRCS:%.c=%.o)
BIN = chatroom$(EXE)
all: bin
run: bin
cd $(BIN_DIR) && ./$(BIN)
clean:
@cd $(SRC_DIR) && rm -f $(OBJS)
bin: $(BIN_DIR)/$(BIN)
$(BIN_DIR)/$(BIN): $(OBJS:%=$(SRC_DIR)/%)
$(CC) -o $@ $^ $(LIBS)
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
.PHONY: all bin run clean
1
https://gitee.com/supansun/chatroom.git
git@gitee.com:supansun/chatroom.git
supansun
chatroom
chatroom
master

Search