aboutsummaryrefslogtreecommitdiff
path: root/example/Makefile
blob: 6f0fff85d8c10c0125b0712f54c91b06ad4c58af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
SERVER_NAME=server
SERVER_OBJ=server.o ../src/server.o ../src/tsocket.o ../src/util.o ../src/evloop.o ../src/tpool.o ../src/connection.o ../src/acceptor.o

CLIENT_NAME=client
CLIENT_OBJ=client.o ../src/util.o

.PHONY: all
all: $(SERVER_NAME) $(CLIENT_NAME)

%.o: %.c
	$(CC) -c $(CFLAGS) $< -o $@

$(SERVER_NAME): $(SERVER_OBJ)
	$(CC) -o $@ $^

$(CLIENT_NAME): $(CLIENT_OBJ)
	$(CC) -o $@ $^

.PHONY: clean
clean:
	rm -rf $(CLIENT_NAME) $(SERVER_NAME) *.o